Change key to 'trait_id'

This commit is contained in:
Thomas Rubini 2023-04-02 12:30:56 +02:00
parent cd1c829273
commit e7b43d0190
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373

View File

@ -36,7 +36,7 @@ def npc(npc_id):
npc_answers.append(answer_list)
reactions = [{
"id": reaction.TRAIT.TRAIT_ID,
"trait_id": reaction.TRAIT.TRAIT_ID,
"name": reaction.TRAIT.NAME_LOCALE.get_text(DEFAULT_LANG).TEXT,
"url": "/api/v1/getReaction?uuid="+reaction.REACTION_UUID
} for reaction in npc_obj.REACTIONS]
@ -45,7 +45,7 @@ def npc(npc_id):
for trait in db.session.query(Trait).all():
if trait.TRAIT_ID not in [reaction.TRAIT.TRAIT_ID for reaction in npc_obj.REACTIONS]:
reactions_to_add.append({
"id": trait.TRAIT_ID,
"trait_id": trait.TRAIT_ID,
"name": trait.NAME_LOCALE.get_text(DEFAULT_LANG).TEXT
})