diff options
author | Louie S <louie@example.com> | 2023-09-16 09:36:14 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-09-16 09:36:14 -0400 |
commit | b4025edf0ac5400d4dd8c418a9a156c44e9c67f8 (patch) | |
tree | bc583aca1f81689790acfbfbabc43dd2ffd29499 /add_group_form.py | |
parent | e1c06206b38d5c6fdc603073c239c95e05d978d2 (diff) |
Saving and loading working for groups
Diffstat (limited to 'add_group_form.py')
-rw-r--r-- | add_group_form.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/add_group_form.py b/add_group_form.py index e62b211..dc83b89 100644 --- a/add_group_form.py +++ b/add_group_form.py @@ -5,6 +5,7 @@ from PyQt5.QtCore import Qt from add_entry_form import Globals from group import Group +DB = __import__("db_sqlite") class addGroupForm(QDialog): """ @@ -65,9 +66,9 @@ class addGroupForm(QDialog): QMessageBox.Close) return + new_id = DB.insertGroup(Group(0, name_text, column_text, link_text)) # TODO do the database stuff (this will allow us to get the id) - Globals.groups.append(Group(Globals.max_group_id, name_text, column_text, link_text)) - Globals.max_group_id = Globals.max_group_id + 1 + Globals.groups.append(Group(new_id, name_text, column_text, link_text)) self.close() if __name__ == "__main__": |