Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account not marked as legacy #740

Open
2 tasks
lukasjuhrich opened this issue Jul 11, 2024 · 1 comment
Open
2 tasks

Account not marked as legacy #740

lukasjuhrich opened this issue Jul 11, 2024 · 1 comment
Labels
bug easy task 🔨 web/ui Things relating to Flask routes and Jinja templates

Comments

@lukasjuhrich
Copy link
Collaborator

lukasjuhrich commented Jul 11, 2024

I've stumbled across this piece of code, which most likely is a bug:

account = session.get(Account, account_id)
if not account:
abort(404)
account.legacy = not account.legacy
session.commit()

it's missing a session.add(account).

  • Add a test witnessing this bug
  • make it pass :)
@lukasjuhrich lukasjuhrich added bug 🔨 web/ui Things relating to Flask routes and Jinja templates easy task labels Jul 11, 2024
@ibot3
Copy link
Member

ibot3 commented Aug 2, 2024

Since when is it required to call session.add on existing objects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug easy task 🔨 web/ui Things relating to Flask routes and Jinja templates
Projects
None yet
Development

No branches or pull requests

2 participants