[Getan-commits] [PATCH] Update project time when moving an entrie

Wald Commits scm-commit at wald.intevation.org
Tue May 8 17:55:52 CEST 2018


# HG changeset patch
# User Magnus Schieder <mschieder at intevation.de>
# Date 1525794656 -7200
# Node ID 3853cf82ca3ca8e8e4c646277810426658dddd16
# Parent  d379f8098bb362f0585dff20b6b87ef72846bac9
Update project time when moving an entrie.

diff -r d379f8098bb3 -r 3853cf82ca3c CHANGES
--- a/CHANGES	Tue May 08 15:00:31 2018 +0200
+++ b/CHANGES	Tue May 08 17:50:56 2018 +0200
@@ -9,7 +9,7 @@
    You can now see which entries are displayed when you are in the entries
    list. The project you are in is highlighted in color. The color can be
    changed in the getanrc with the key "open_project".
-   When deleting an entrie the project time is updated.
+   When deleting or moving an entrie, the project times are updated.
    Patch by Magnus Schieder
 
  * Updated the source code to the latest version of pyhton (python 3) to better
diff -r d379f8098bb3 -r 3853cf82ca3c getan/controller.py
--- a/getan/controller.py	Tue May 08 15:00:31 2018 +0200
+++ b/getan/controller.py	Tue May 08 17:50:56 2018 +0200
@@ -77,7 +77,10 @@
         old_project = self.project_by_id(entries[0].project_id)
         self.backend.move_entries(entries, project.id)
         self.update_entries(old_project)
+        self.update_projects()
         self.project_view.update_rows()
+        open_project = self.project_by_id(old_project.id)
+        open_project.open = True
 
     def delete_entries(self, entry_nodes):
         if not entry_nodes:


More information about the Getan-commits mailing list