Proper classmethod parent invoke for account/person
This commit is contained in:
parent
0902d0c9b2
commit
6f1bf1ba1f
@ -36,9 +36,9 @@ class Account(Person):
|
|||||||
logg.debug('tags are now {}'.format(self.tags))
|
logg.debug('tags are now {}'.format(self.tags))
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@classmethod
|
||||||
def from_person_data(person_data):
|
def deserialize(cls, person_data):
|
||||||
o = Account.deserialize(person_data)
|
o = super(Account, cls).deserialize(person_data)
|
||||||
try:
|
try:
|
||||||
o.tags = person_data['custom']['tags']
|
o.tags = person_data['custom']['tags']
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
@ -184,7 +184,6 @@ class FileUserStore:
|
|||||||
logg.info(e)
|
logg.info(e)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
#getter = MetadataRequestsHandler(MetadataPointer.PHONE, phone.encode('utf-8'))
|
|
||||||
r = None
|
r = None
|
||||||
user_address = None
|
user_address = None
|
||||||
try:
|
try:
|
||||||
@ -210,7 +209,7 @@ class FileUserStore:
|
|||||||
v = json.loads(v)
|
v = json.loads(v)
|
||||||
person = Account()
|
person = Account()
|
||||||
try:
|
try:
|
||||||
person_data = person.from_person_data(person_data=v)
|
person_data = person.deserialize(person_data=v)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logg.error('e {}'.format(e))
|
logg.error('e {}'.format(e))
|
||||||
person_data = v
|
person_data = v
|
||||||
@ -234,7 +233,7 @@ class FileUserStore:
|
|||||||
|
|
||||||
data = json.loads(r)
|
data = json.loads(r)
|
||||||
person = Account()
|
person = Account()
|
||||||
person_data = person.from_person_data(person_data=data)
|
person_data = person.deserialize(person_data=data)
|
||||||
|
|
||||||
ptr = generate_metadata_pointer(bytes.fromhex(address), MetadataPointer.CUSTOM)
|
ptr = generate_metadata_pointer(bytes.fromhex(address), MetadataPointer.CUSTOM)
|
||||||
r = None
|
r = None
|
||||||
|
Loading…
Reference in New Issue
Block a user