diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 02cbb1d..9c4d76d 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -910,13 +910,15 @@ class ModerationAnswer(models.Model): def valid_event(self, event): if event.tags: - for t in self.adds_tags: - if t not in event.tags: - return False + if self.adds_tags: + for t in self.adds_tags: + if t not in event.tags: + return False - for t in self.removes_tags: - if t in event.tags: - return False + if self.removes_tags: + for t in self.removes_tags: + if t in event.tags: + return False return True else: