mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
Corp updates are included in the characters, so seperate corp update is optional
This commit is contained in:
@@ -9,6 +9,8 @@ class UpdateAPIs():
|
|||||||
Updates all Eve API elements in the database
|
Updates all Eve API elements in the database
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
settings = { 'update_corp': False }
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _logger(self):
|
def _logger(self):
|
||||||
if not hasattr(self, '__logger'):
|
if not hasattr(self, '__logger'):
|
||||||
@@ -30,9 +32,10 @@ class UpdateAPIs():
|
|||||||
|
|
||||||
acc.save()
|
acc.save()
|
||||||
|
|
||||||
for corp in EVEPlayerCorporation.objects.all():
|
if self.settings['update_corp']:
|
||||||
try:
|
for corp in EVEPlayerCorporation.objects.all():
|
||||||
corp.query_and_update_corp()
|
try:
|
||||||
except:
|
corp.query_and_update_corp()
|
||||||
self._logger.error('Error updating %s' % corp)
|
except:
|
||||||
continue
|
self._logger.error('Error updating %s' % corp)
|
||||||
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user