mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-14 02:28:23 +00:00
fix: [tracker] firce delete objects filter on edit
This commit is contained in:
parent
8ffde9639e
commit
33062b8bdb
1 changed files with 4 additions and 2 deletions
|
@ -215,6 +215,8 @@ class Tracker:
|
||||||
|
|
||||||
def del_filters(self, tracker_type, to_track):
|
def del_filters(self, tracker_type, to_track):
|
||||||
filters = self.get_filters()
|
filters = self.get_filters()
|
||||||
|
if not filters:
|
||||||
|
filters = get_objects_tracked()
|
||||||
for obj_type in filters:
|
for obj_type in filters:
|
||||||
r_tracker.srem(f'trackers:objs:{tracker_type}:{obj_type}', to_track)
|
r_tracker.srem(f'trackers:objs:{tracker_type}:{obj_type}', to_track)
|
||||||
r_tracker.srem(f'trackers:uuid:{tracker_type}:{to_track}', f'{self.uuid}:{obj_type}')
|
r_tracker.srem(f'trackers:uuid:{tracker_type}:{to_track}', f'{self.uuid}:{obj_type}')
|
||||||
|
@ -541,12 +543,12 @@ class Tracker:
|
||||||
r_tracker.sadd(f'trackers:objs:{tracker_type}:{obj_type}', to_track)
|
r_tracker.sadd(f'trackers:objs:{tracker_type}:{obj_type}', to_track)
|
||||||
r_tracker.sadd(f'trackers:uuid:{tracker_type}:{to_track}', f'{self.uuid}:{obj_type}')
|
r_tracker.sadd(f'trackers:uuid:{tracker_type}:{to_track}', f'{self.uuid}:{obj_type}')
|
||||||
|
|
||||||
|
self._set_field('last_change', time.time())
|
||||||
|
|
||||||
# Refresh Trackers
|
# Refresh Trackers
|
||||||
trigger_trackers_refresh(tracker_type)
|
trigger_trackers_refresh(tracker_type)
|
||||||
if tracker_type != old_type:
|
if tracker_type != old_type:
|
||||||
trigger_trackers_refresh(old_type)
|
trigger_trackers_refresh(old_type)
|
||||||
|
|
||||||
self._set_field('last_change', time.time())
|
|
||||||
return self.uuid
|
return self.uuid
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
|
|
Loading…
Reference in a new issue