community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1689574 - /comdev/reporter.apache.org/branches/deployed/site/addrelease.py
Date Tue, 07 Jul 2015 05:36:02 GMT
Author: sebb
Date: Tue Jul  7 05:36:01 2015
New Revision: 1689574

URL: http://svn.apache.org/r1689574
Log:
Handle 1970-01-01 as a deletion

Modified:
    comdev/reporter.apache.org/branches/deployed/site/addrelease.py

Modified: comdev/reporter.apache.org/branches/deployed/site/addrelease.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/branches/deployed/site/addrelease.py?rev=1689574&r1=1689573&r2=1689574&view=diff
==============================================================================
--- comdev/reporter.apache.org/branches/deployed/site/addrelease.py (original)
+++ comdev/reporter.apache.org/branches/deployed/site/addrelease.py Tue Jul  7 05:36:01 2015
@@ -41,10 +41,13 @@ def getReleaseData(committee):
 
 saved = False
 committees = getPMCs(user)
-if date and version and committee:
+if date != None and version and committee:
     if committee in committees or isMember(user):
         rdata = getReleaseData(committee)
-        rdata[version] = date
+        if date > 0:
+            rdata[version] = date
+        else: # it's 1970-01-01
+            del rdata[version]
         with open("/var/www/reporter.apache.org/data/releases/%s.json" % committee, "w")
as f:
             f.write(json.dumps(rdata))
             f.close()
@@ -60,4 +63,3 @@ if not saved:
         print("Content-Type: application/json\r\n\r\n{\"error\": \"Not saved\"}")
     else:
         print("Content-Type: text/plain\r\n\r\nCould not save. Make sure you have filled
out all fields and have access to this committee data! For further inquiries, please contact
dev@community.apache.org")
-    
\ No newline at end of file



Mime
View raw message