diff options
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/models.py | 6 | ||||
-rw-r--r-- | ishtar_common/templatetags/link_to_window.py | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 319f19539..c7223c898 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -175,9 +175,13 @@ class HistoricalRecords(BaseHistoricalRecords): q = q_history.filter(history_date__isnull=False, history_date__gt=min_history_date) \ .order_by('-history_date', '-history_id') - if q.count(): + force = getattr(instance, "_force_history", False) + if not force and q.count(): return + if force: + delattr(instance, '_force_history') + if 'history_date' not in attrs or not attrs['history_date']: attrs['history_date'] = datetime.datetime.now() # record a new version only if data have been changed diff --git a/ishtar_common/templatetags/link_to_window.py b/ishtar_common/templatetags/link_to_window.py index 892492895..439602665 100644 --- a/ishtar_common/templatetags/link_to_window.py +++ b/ishtar_common/templatetags/link_to_window.py @@ -30,7 +30,6 @@ def link_to_window(item, context): else: return u"" if not item.can_view(request): - print(item, "NOK3") return u"" return simple_link_to_window(item) |