Fake the subclass to ease migration

This commit is contained in:
Mark Veidemanis 2022-04-20 21:15:32 +01:00
parent 0ec8476549
commit ae9ecf09c2
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 3 additions and 0 deletions

View File

@ -449,6 +449,7 @@ class Transactions(util.Base):
matching_trades = [] matching_trades = []
for reference in refs: for reference in refs:
ref_data = self.get_ref(reference) ref_data = self.get_ref(reference)
print("REF DATA", ref_data)
tx_platform = ref_data["subclass"] tx_platform = ref_data["subclass"]
tx_username = ref_data["buyer"] tx_username = ref_data["buyer"]
trade_id = ref_data["id"] trade_id = ref_data["id"]
@ -638,6 +639,8 @@ class Transactions(util.Base):
""" """
ref_data = r.hgetall(f"trade.{reference}") ref_data = r.hgetall(f"trade.{reference}")
ref_data = util.convert(ref_data) ref_data = util.convert(ref_data)
if "subclass" not in ref_data:
ref_data["subclass"] = "agora"
if not ref_data: if not ref_data:
return False return False
return ref_data return ref_data