diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2013-02-11 05:48:20 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2013-02-11 05:48:20 +0000 |
commit | 4951c1b04bf66f81cf648b76af3795245d56381a (patch) | |
tree | 7e6182a46d4d246716438cdb9ecd4480ef3d4b65 /sca-cpp/trunk/hosting/server/icons.py | |
parent | 5c0eab60028407c84e2fee6a4fa1fbc03716d1d2 (diff) |
Improvements to the app management UI.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1444660 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/hosting/server/icons.py')
-rw-r--r-- | sca-cpp/trunk/hosting/server/icons.py | 21 |
1 files changed, 18 insertions, 3 deletions
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) |