Use model to toggle research mode

Just a nice bit of encapsulation, rather than passing `current_service`
through to a method on `current_service`.
This commit is contained in:
Chris Hill-Scott
2018-11-05 16:17:44 +00:00
parent 318f846630
commit 48b0d4194e
2 changed files with 6 additions and 3 deletions

View File

@@ -78,6 +78,11 @@ class Service():
self.update_with_properties(data)
def toggle_research_mode(self):
self.update_with_properties({
'research_mode': not self.research_mode,
})
@property
def trial_mode(self):
return self._dict['restricted']