mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Don't create a alliance of 0 on import
This commit is contained in:
@@ -48,7 +48,8 @@ def import_corp_details_func(corp_id):
|
||||
for logo_map in logo_mappings:
|
||||
setattr(corpobj, logo_map[1], d['logo'][logo_map[0]])
|
||||
|
||||
corpobj.alliance, created = EVEPlayerAlliance.objects.get_or_create(id=d['allianceID'])
|
||||
if int(d['alliance']):
|
||||
corpobj.alliance, created = EVEPlayerAlliance.objects.get_or_create(id=d['allianceID'])
|
||||
corpobj.api_last_updated = datetime.utcnow()
|
||||
corpobj.save()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user