incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [18/42] git commit: [#6704] ticket:454 added checking if file exists
Date Tue, 29 Oct 2013 22:23:19 GMT
[#6704] ticket:454 added checking if file exists


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

Branch: refs/heads/cj/6692
Commit: 55c5fe4b904de0506c271518c30c3721e451d3e4
Parents: f70c6b9
Author: coldmind <sokandpal@yandex.ru>
Authored: Thu Oct 17 16:38:10 2013 +0300
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu Oct 24 20:30:09 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/forge/tracker.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/55c5fe4b/ForgeImporters/forgeimporters/forge/tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/forge/tracker.py b/ForgeImporters/forgeimporters/forge/tracker.py
index 4d1b74d..d9154bc 100644
--- a/ForgeImporters/forgeimporters/forge/tracker.py
+++ b/ForgeImporters/forgeimporters/forge/tracker.py
@@ -76,7 +76,11 @@ class ForgeTrackerImportController(BaseController):
     @validate(ForgeTrackerImportForm(ForgeTrackerApp), error_handler=index)
     def create(self, tickets_json, mount_point, mount_label, **kw):
         if self.importer.enforce_limit(c.project):
-            save_importer_upload(c.project, 'tickets.json', json.dumps(tickets_json))
+            if not tickets_json:
+                flash('No file specified.', 'error')
+                redirect(c.project.url() + 'admin/')
+            else:
+                save_importer_upload(c.project, 'tickets.json', json.dumps(tickets_json))
             self.importer.post(
                     mount_point=mount_point,
                     mount_label=mount_label,


Mime
View raw message