Skip to content

Commit

Permalink
[organisation] clear organisation cache when updating organisation
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBldy committed Jul 16, 2024
1 parent 84aa0a4 commit 59c6b28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions zou/app/blueprints/crud/organisation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from zou.app.models.organisation import Organisation
from zou.app.blueprints.crud.base import BaseModelResource, BaseModelsResource

from zou.app.services import persons_service


class OrganisationsResource(BaseModelsResource):
def __init__(self):
Expand All @@ -21,3 +23,7 @@ def pre_update(self, instance_dict, data):
if "hours_by_day" in data:
data["hours_by_day"] = float(data["hours_by_day"])
return data

def post_update(self, instance_dict, data):
persons_service.clear_oranisation_cache()
return instance_dict

0 comments on commit 59c6b28

Please sign in to comment.