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

Save by pressing "New Module (and other?)" #2

Closed
julianwiedermann opened this issue Apr 15, 2024 · 5 comments
Closed

Save by pressing "New Module (and other?)" #2

julianwiedermann opened this issue Apr 15, 2024 · 5 comments
Labels

Comments

@julianwiedermann
Copy link
Collaborator

No description provided.

@julianwiedermann
Copy link
Collaborator Author

New Module (et al.) shouldn't be saved directly (and empty). Instead it should be saved when hitting "save" the first time.

@pfaffelh
Copy link
Owner

Dazu müsste man beim Click auf editieren eines Moduls die Einträge im session_state zwischenspeichern, und auf den "..._edit"-Seiten die Einträge aus dem session_state wieder auslesen. Bei "Neues Modul" kann man dann den session_state entsprechend ändern, so dass die "..._edit"-Seite korrekt nach einem neuen Modul aussieht, obwohl es noch nicht gespeichert ist.

Tobb2002 pushed a commit that referenced this issue May 28, 2024
@Tobb2002
Copy link
Collaborator

Tobb2002 commented May 28, 2024

Beim speichern einer neuen Person ohne ändern des Namens kommt es zu dem folgenden Fehler:

TypeError: 'NoneType' object is not subscriptable
Traceback:

File "/home/tobi/.conda/envs/mathefaq/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
    exec(code, module.__dict__)
File "/home/tobi/documents/studium/semester8/mathefaq/mi-vvz/pages/03_Personen_edit.py", line 90, in <module>
    tools.update_confirm(collection, x, x_updated, )
File "/home/tobi/documents/studium/semester8/mathefaq/mi-vvz/misc/tools.py", line 48, in update_confirm
    util.logger.info(f"User {st.session_state.user} hat in {util.collection_name[collection]} Item {repr(collection, x['_id'])} geändert.")
                                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tobi/documents/studium/semester8/mathefaq/mi-vvz/misc/tools.py", line 327, in repr
    res = f"{x['name']}, {x['name_prefix']}" if short else f"{x['name']}, {x['vorname']}"

Tobb2002 pushed a commit that referenced this issue May 28, 2024
Tobb2002 pushed a commit that referenced this issue May 28, 2024
Tobb2002 pushed a commit that referenced this issue May 28, 2024
Tobb2002 pushed a commit that referenced this issue May 28, 2024
Tobb2002 pushed a commit that referenced this issue May 28, 2024
Tobb2002 pushed a commit that referenced this issue May 28, 2024
@Tobb2002
Copy link
Collaborator

Für Anforderungskategorie kann das Problem noch nicht gelöst werden, da die edit Seite hier fehlt.

@pfaffelh
Copy link
Owner

pfaffelh commented Jul 3, 2024

Alles fertig.

@pfaffelh pfaffelh closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants