From: Magnus Hagander Date: Wed, 21 Aug 2024 11:35:38 +0000 (+0200) Subject: Mark some missing unsafe attributes X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=df22c1f697144c3157c7b0daa6ee8e02b5b0e9fc;p=pgeu-system.git Mark some missing unsafe attributes --- diff --git a/postgresqleu/confreg/models.py b/postgresqleu/confreg/models.py index 7216cb70..860449af 100644 --- a/postgresqleu/confreg/models.py +++ b/postgresqleu/confreg/models.py @@ -960,6 +960,8 @@ class Room(models.Model): json_included_attributes = ['roomname', 'capacity', 'sortkey'] + _unsafe_attributes = ['comment', ] + def __str__(self): return self.roomname @@ -1148,6 +1150,11 @@ class ConferenceSession(models.Model): # has given any feedback on this session. has_given_feedback = False + _unsafe_attributes = [ + 'submissionnote', 'internalnote', + 'tentativescheduleslot_id', 'tentativescheduleslot', 'tentativeroom', 'tentativeroom_id', + ] + @property def speaker_list(self): if self.id: diff --git a/postgresqleu/confsponsor/models.py b/postgresqleu/confsponsor/models.py index 78db268c..823cc616 100644 --- a/postgresqleu/confsponsor/models.py +++ b/postgresqleu/confsponsor/models.py @@ -30,6 +30,8 @@ class SponsorshipContract(models.Model): contractpdf = PdfBinaryField(null=False, blank=False, max_length=1000000, verbose_name='Contract PDF') fieldjson = models.JSONField(blank=False, null=False, default=dict, encoder=DjangoJSONEncoder) + _safe_attributes = ['conference', 'contractname'] + def __str__(self): return self.contractname