Skip to content

Commit

Permalink
More simple status toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
jberghoef committed May 26, 2018
1 parent c5408f9 commit 9958dd6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/wagtail_personalisation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ def get_rules(self):
return segment_rules

def toggle(self, save=True):
self.enabled = (
True if self.enabled == False
else False)
self.enabled = not self.enabled
if save:
self.save()

Expand Down

0 comments on commit 9958dd6

Please sign in to comment.