def action_editmeta(self, user, timestamp, key, value, data): from item.models import Metadata m = Metadata.get(key, value) if not m or m.timestamp < timestamp: if not m: m = Metadata.get_or_create(key, value) if m.edit(data): m.update_items() user.clear_smart_list_cache() return True
def action_resetmeta(self, user, timestamp, key, value): from item.models import Metadata m = Metadata.get(key, value) if m and m.timestamp < timestamp: m.reset() user.clear_smart_list_cache() return True