Add missing Event class cache invalidation

Needed when calling the refresh() method. Otherwise
null StoredEvent instances will be returned.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-11-12 00:23:18 -04:00
parent a60c2fa94c
commit e593dcb5d8
2 changed files with 5 additions and 0 deletions

View File

@@ -16,6 +16,8 @@
- Fix NamedMultiWidget issue on Python 3. Affects
document checkout form. GitLab issue #683. Thanks
to John Bentley (@johnbentleyii) for the report.
- Add missing Event class cache invalidation when
calling the refresh() method.
3.2.9 (2019-11-03)
==================

View File

@@ -73,6 +73,9 @@ class EventType(object):
@classmethod
def refresh(cls):
for event_type in cls.all():
# Invalidate cache and recreate store events while repopulating
# cache
event_type.stored_event_type = None
event_type.get_stored_event_type()
def __init__(self, namespace, name, label):