Proper classmethod parent invoke for account/person

This commit is contained in:
nolash 2021-11-06 14:51:52 +01:00
parent 0902d0c9b2
commit 6f1bf1ba1f
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -36,9 +36,9 @@ class Account(Person):
logg.debug('tags are now {}'.format(self.tags))
@staticmethod
def from_person_data(person_data):
o = Account.deserialize(person_data)
@classmethod
def deserialize(cls, person_data):
o = super(Account, cls).deserialize(person_data)
try:
o.tags = person_data['custom']['tags']
except KeyError as e:
@ -184,7 +184,6 @@ class FileUserStore:
logg.info(e)
pass
#getter = MetadataRequestsHandler(MetadataPointer.PHONE, phone.encode('utf-8'))
r = None
user_address = None
try:
@ -210,7 +209,7 @@ class FileUserStore:
v = json.loads(v)
person = Account()
try:
person_data = person.from_person_data(person_data=v)
person_data = person.deserialize(person_data=v)
except Exception as e:
logg.error('e {}'.format(e))
person_data = v
@ -234,7 +233,7 @@ class FileUserStore:
data = json.loads(r)
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)
r = None