Running into data model consistency issues with /tag and /tags. Compensating code and a warning when we aren't able to load an attribute.
Running into data model consistency issues with /tag and /tags. Compensating code and a warning when we aren't able to load an attribute.

>>> pprint([v for v in AFTag.list() if v.public_name == u'22537.gsrt_blevene_Bartallex_NoStats'][0].__dict__)
{'_last_hit': u'2015-10-18 16:09:22',
 'comments': <autofocus.NotLoaded object at 0x7ff5d12cf110>,
 'count': 28098,
 'customer_name': u'Palo Alto Networks Researcher',
 'definition_scope': u'private',
 'definition_scope_id': 1,
 'definition_status': u'enabled',
 'definition_status_id': 1,
 'description': u'Malicious macro used to distribute dridex and other trojans. This tag is a variant of gsrt_blevene_Bartallex and removes the reliance on stat module checkin.',
 'down_votes': 0,
 'last_hit': datetime.datetime(2015, 10, 18, 16, 9, 22),
 'name': u'gsrt_blevene_Bartallex_NoStats',
 'public_name': u'22537.gsrt_blevene_Bartallex_NoStats',
 'references': <autofocus.NotLoaded object at 0x7ff5d12cf150>,
 'support_id': <autofocus.NotLoaded object at 0x7ff5d12cf190>,
 'tag_class': <autofocus.NotLoaded object at 0x7ff5d12cf0d0>,
 'tag_class_id': None,
 'up_votes': 0}
>>> pprint(AFTag.get(u'22537.gsrt_blevene_Bartallex_NoStats').__dict__)
{'_last_hit': u'2015-10-18 16:09:22',
 'comments': [],
 'count': 28098,
 'customer_name': u'Palo Alto Networks Researcher',
 'definition_scope': u'private',
 'definition_scope_id': 1,
 'definition_status': u'enabled',
 'definition_status_id': 1,
 'description': u'Malicious macro used to distribute dridex and other trojans. This tag is a variant of gsrt_blevene_Bartallex and removes the reliance on stat module checkin.',
 'down_votes': 0,
 'last_hit': datetime.datetime(2015, 10, 18, 16, 9, 22),
 'name': u'gsrt_blevene_Bartallex_NoStats',
 'public_name': u'22537.gsrt_blevene_Bartallex_NoStats',
 'references': None,
 'support_id': 5,
 'tag_class': <autofocus.NotLoaded object at 0x7ff5d1138a50>,
 'tag_class_id': None,
 'up_votes': 0}
>>> pprint(AFTag.get(u'22537.gsrt_blevene_Bartallex_NoStats').tag_class)
Unable to lazy load tag attribute, defaulting to None! tag:22537.gsrt_blevene_Bartallex_NoStats attribute:tag_class
None

PaloAltoNetworks-BD/autofocus-client-library