From 4951c1b04bf66f81cf648b76af3795245d56381a Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 11 Feb 2013 05:48:20 +0000 Subject: Improvements to the app management UI. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1444660 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/hosting/server/icons.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'sca-cpp/trunk/hosting/server/icons.py') diff --git a/sca-cpp/trunk/hosting/server/icons.py b/sca-cpp/trunk/hosting/server/icons.py index d9fbcab448..a7d63348b3 100644 --- a/sca-cpp/trunk/hosting/server/icons.py +++ b/sca-cpp/trunk/hosting/server/icons.py @@ -105,12 +105,22 @@ def put(id, icon, user, cache, apps): debug('icons.py::put::img', img) iconentry = mkentry(title(app), car(id), author(app), now(), ("'icon", ("'image", img))) debug('icons.py::put::iconentry', iconentry) - return cache.put(iconid(id), iconentry) + rc = cache.put(iconid(id), iconentry) + if rc == False: + return False + + # Update the app's updated date + return apps.put(id, app) # Put default empty icon iconentry = mkentry(title(app), car(id), author(app), now(), ()) debug('icons.py::put::iconentry', iconentry) - return cache.put(iconid(id), iconentry) + rc = cache.put(iconid(id), iconentry) + if rc == False: + return False + + # Update the app's updated date + return apps.put(id, app) # Get an icon def get(id, user, cache, apps): @@ -171,5 +181,10 @@ def delete(id, user, cache, apps): return False # Delete the icon - return cache.delete(iconid(id)) + rc = cache.delete(iconid(id)) + if rc == False: + return False + + # Update the app's updated date + return apps.put(id, app) -- cgit v1.2.3