def _translations_relicensing_agreement(self): """Return whether translator agrees to relicense their translations. If she has made no explicit decision yet, return None. """ relicensing_agreement = TranslationRelicensingAgreement.selectOneBy( person=self.person) if relicensing_agreement is None: return None else: return relicensing_agreement.allow_relicensing
def set_translations_relicensing_agreement(self, value): """Set a translations relicensing decision by translator. If she has already made a decision, overrides it with the new one. """ relicensing_agreement = TranslationRelicensingAgreement.selectOneBy( person=self.person) if relicensing_agreement is None: relicensing_agreement = TranslationRelicensingAgreement( person=self.person, allow_relicensing=value) else: relicensing_agreement.allow_relicensing = value del get_property_cache(self)._translations_relicensing_agreement