Skip to content

Commit

Permalink
fix: error related to using model reference in async context
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Iakobinyi-Pich authored and lucianHymer committed Sep 16, 2024
1 parent 98fa6ad commit 61685b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/account/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,10 @@ async def aget_customization_dynamic_weights(self) -> dict:
weights[f"AllowList#{address_list.name}"] = str(allow_list.weight)

async for custom_credential in self.custom_credentials.all():
weights[custom_credential.ruleset.provider_id] = str(
custom_credential.weight
rulesset = await CustomCredentialRuleset.objects.aget(
id=custom_credential.ruleset_id
)
weights[rulesset.provider_id] = str(custom_credential.weight)

return weights

Expand All @@ -592,7 +593,7 @@ def get_custom_stamps(self):
"url": platform.banner_cta_url,
},
},
"isEVM": platform.one_click_flow,
"isEVM": False, # platform.one_click_flow,
"credentials": [],
}
stamps[platform.name]["credentials"].append(
Expand Down

0 comments on commit 61685b9

Please sign in to comment.