mirror of
https://github.com/nikdoof/pacmanager.git
synced 2025-12-13 07:32:15 +00:00
Added noupdate to Key save
This commit is contained in:
@@ -121,7 +121,9 @@ class Key(models.Model):
|
||||
return (accessmask & mask) > 0
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
self.update_api()
|
||||
noupdate = kwargs.pop('noupdate', False)
|
||||
if not noupdate:
|
||||
self.update_api()
|
||||
return super(Key, self).save(*args, **kwargs)
|
||||
|
||||
def update_api(self):
|
||||
|
||||
@@ -25,10 +25,10 @@ def import_wallet_journal(corporation_id):
|
||||
except Error, e:
|
||||
print e
|
||||
key.error = str(e)
|
||||
key.save()
|
||||
key.save(noupdate=True)
|
||||
else:
|
||||
key.error = None
|
||||
key.save()
|
||||
key.save(noupdate=True)
|
||||
if type(res.entries) == str: return None
|
||||
entries = res.entries.SortedBy('refID', reverse=True)
|
||||
if len(entries) == rowCount:
|
||||
|
||||
Reference in New Issue
Block a user