always cast modified_on to int()
This commit is contained in:
parent
9dc25ef7af
commit
8996aafe0d
2 changed files with 3 additions and 3 deletions
|
@ -311,7 +311,7 @@ class Account:
|
|||
private_key=private_key,
|
||||
public_key=public_key,
|
||||
address_generator=d.get('address_generator', {}),
|
||||
modified_on=d.get('modified_on', int(time.time())),
|
||||
modified_on=int(d.get('modified_on', time.time())),
|
||||
channel_keys=d.get('certificates', {})
|
||||
)
|
||||
|
||||
|
@ -343,7 +343,7 @@ class Account:
|
|||
def merge(self, d: dict):
|
||||
if d.get('modified_on', 0) > self.modified_on:
|
||||
self.name = d['name']
|
||||
self.modified_on = d.get('modified_on', int(time.time()))
|
||||
self.modified_on = int(d.get('modified_on', time.time()))
|
||||
assert self.address_generator.name == d['address_generator']['name']
|
||||
for chain_name in ('change', 'receiving'):
|
||||
if chain_name in d['address_generator']:
|
||||
|
|
|
@ -35,7 +35,7 @@ class TimestampedPreferences(UserDict):
|
|||
def __setitem__(self, key, value):
|
||||
self.data[key] = {
|
||||
'value': value,
|
||||
'ts': time.time()
|
||||
'ts': int(time.time())
|
||||
}
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Reference in a new issue