allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [3/3] allura git commit: [#8149] Moves flash() call from 'soft_delete' model method to 'delete' controller method
Date Thu, 22 Mar 2018 18:21:52 GMT
[#8149] Moves flash() call from 'soft_delete' model method to 'delete' controller method


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/78fefa84
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/78fefa84
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/78fefa84

Branch: refs/heads/master
Commit: 78fefa8450c949939af263414c29b2567de8a273
Parents: 8e568e7
Author: deshigtk <deshigtk@gmail.com>
Authored: Thu Mar 22 22:56:58 2018 +0530
Committer: deshigtk <deshigtk@gmail.com>
Committed: Thu Mar 22 22:56:58 2018 +0530

----------------------------------------------------------------------
 ForgeTracker/forgetracker/model/ticket.py | 3 +--
 ForgeTracker/forgetracker/tracker_main.py | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/78fefa84/ForgeTracker/forgetracker/model/ticket.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index 084eb8d..5a26071 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -37,7 +37,7 @@ from ming.orm import FieldProperty, ForeignIdProperty, RelationProperty
 from ming.orm.declarative import MappedClass
 from ming.orm.ormsession import ThreadLocalORMSession
 
-from tg import config as tg_config, flash
+from tg import config as tg_config
 
 from allura.model import (
     ACE,
@@ -1316,7 +1316,6 @@ class Ticket(VersionedArtifact, ActivityObject, VotableArtifact):
         suffix = " {dt.hour}:{dt.minute}:{dt.second} {dt.day}-{dt.month}-{dt.year}".format(
             dt=datetime.utcnow())
         self.summary += suffix
-        flash('Ticket successfully deleted')
         c.app.globals.invalidate_bin_counts()
 
 

http://git-wip-us.apache.org/repos/asf/allura/blob/78fefa84/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index ca45f4c..d08254d 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -1446,6 +1446,7 @@ class TicketController(BaseController, FeedController):
     @require_post()
     def delete(self, **kw):
         self.ticket.soft_delete()
+        flash('Ticket successfully deleted')
         return dict(location='../' + str(self.ticket.ticket_num))
 
     @without_trailing_slash


Mime
View raw message