Skip to content

Commit

Permalink
- Fix LGTM issues
Browse files Browse the repository at this point in the history
(cherry picked from commit 08644a6)
  • Loading branch information
afabiani committed Nov 23, 2020
1 parent 17ff1eb commit aa19da7
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions geonode/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,6 @@ def save(self, notify=False, *args, **kwargs):
notice_type_label = '%s_approved' % self.class_name.lower()
recipients = get_notification_recipients(notice_type_label, resource=self)
send_notification(recipients, notice_type_label, {'resource': self})
_notification_sent = True

# Publishing Notifications Here
if not _notification_sent and settings.RESOURCE_PUBLISHING:
Expand All @@ -911,16 +910,13 @@ def save(self, notify=False, *args, **kwargs):
notice_type_label = '%s_published' % self.class_name.lower()
recipients = get_notification_recipients(notice_type_label, resource=self)
send_notification(recipients, notice_type_label, {'resource': self})
_notification_sent = True

# Updated Notifications Here
if not _notification_sent:
notice_type_label = '%s_updated' % self.class_name.lower()
recipients = get_notification_recipients(notice_type_label, resource=self)
send_notification(recipients, notice_type_label, {'resource': self})

_notification_sent = False

super(ResourceBase, self).save(*args, **kwargs)
self.__is_approved = self.is_approved
self.__is_published = self.is_published
Expand Down

0 comments on commit aa19da7

Please sign in to comment.