dndserver icon indicating copy to clipboard operation
dndserver copied to clipboard

(Minor issue)-Character List is only updated when new characters are created, but not when old character are used. New characters not created on top.

Open Kokkorito opened this issue 1 year ago • 3 comments

When you create new character it goes on top of the first character you created. Here is an example of how it works right now:

The first class I created is Cleric. Then I create Bard the order looks like this. Bard(Created 2nd) Cleric(Created 1st) (This is all good and correct)

Then I create Ranger and the order looks like this Bard(Created 2nd) Ranger(Created 3rd) <-- Should be in number 1 position Cleric(Created 1st)

Then I create Wizard and it looks like this Bard(Created 2nd) Ranger(Created 3rd) Wizard(Created 4th) <-- Should be in number 1 position Cleric(Created 1st)

Then I log in as Cleric and press character select order does not change: Bard(Created 2nd) Ranger(Created 3rd) Wizard(Created 4th) Cleric(Created 1st)<-- Should be in number 1 position

Kokkorito avatar Apr 29 '23 06:04 Kokkorito

Can you point me to the code where this is being handled ? Would love to take a look and try it on my own.

shekhar-chauhan avatar Apr 29 '23 15:04 shekhar-chauhan

@shekhar-chauhan The character list is generated in: list_characters in character.py

itzandroidtab avatar Apr 29 '23 16:04 itzandroidtab

does the attributes = db.query(ItemAttribute).filter_by(item_id=item.id).all() work fine ?
in def get_all_items(character_id):

shekhar-chauhan avatar Apr 29 '23 19:04 shekhar-chauhan