def clean_indicator(self, i): if isinstance(i, dict): i = Indicator(**i) if not i.reported_at: i.reported_at = arrow.utcnow().datetime if not i.group: i.group = 'everyone' if not i.tlp: i.tlp = 'white' return i