[Mpuls-commits] r3617 - in waska/branches/1.7: . waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Sep 14 12:05:40 CEST 2010


Author: roland
Date: 2010-09-14 12:05:38 +0200 (Tue, 14 Sep 2010)
New Revision: 3617

Modified:
   waska/branches/1.7/ChangeLog
   waska/branches/1.7/waskaweb/lib/xmlimport.py
Log:
Comment the special logic for dates in the import

Modified: waska/branches/1.7/ChangeLog
===================================================================
--- waska/branches/1.7/ChangeLog	2010-09-14 08:16:10 UTC (rev 3616)
+++ waska/branches/1.7/ChangeLog	2010-09-14 10:05:38 UTC (rev 3617)
@@ -1,5 +1,10 @@
 2010-09-09  Roland Geider <roland.geider at intevation.de>
+	
+	* waskaweb/lib/xmlimport.py: Comment all the logic for dealing with
+	  dates in the import.
 
+2010-09-09  Roland Geider <roland.geider at intevation.de>
+
 	* waskaweb/lib/xmlimport.py: Fix a problem with imports when no UUID
 	  is available (new imports, etc.)
 

Modified: waska/branches/1.7/waskaweb/lib/xmlimport.py
===================================================================
--- waska/branches/1.7/waskaweb/lib/xmlimport.py	2010-09-14 08:16:10 UTC (rev 3616)
+++ waska/branches/1.7/waskaweb/lib/xmlimport.py	2010-09-14 10:05:38 UTC (rev 3617)
@@ -687,34 +687,39 @@
             # Kind of longish hack because the XML import from Waska does not compare
             # the new data with the current data in the DB (to only update what needs
             # to be updated)
-            if name in ['datum_feststellung', 'beendigung_5']:
-                try:
-                    cm_id = get_id_for_uuid(self.cursor, 'master', self.uuid)
-                except Expeption, e:
-                    print "Exception, could not get ID from UUID: %s" % e
-                
-                cm_date_data = set()
-                if cm_id != None:
-                    try:
-                        cm_date_data = get_cm_dates(self.cursor, cm_id)
-                    except Exception, e:
-                        print "Exception while loading CM dates: %s" % e
-                
-                if cm_date_data != set():
-                    #print cm_date_data
-                    year, month, day = [int(x) for x in self.chars.strip().split("-")]
-                    new_cm_date = datetime.date(year, month, day)
-                    
-                    if name == 'datum_feststellung':
-                        old_cm_date = cm_date_data[0] # Start date of the CM
-                    else:
-                        old_cm_date = cm_date_data[1] # End date of the CM
-                    
-                    if old_cm_date != new_cm_date and new_cm_date < datetime.date(2010, 01, 01):
-                        #print "new dates!"
-                        # Error text not really important since it will not be passed to the user
-                        raise StandardError("Datum darf nicht vor dem 1.1.2010 liegen")
+            
+            
+            # Commented on 14.09.2010, date filter not needed anymore
+            # --------------------------------------------------------
 
+            #if name in ['datum_feststellung', 'beendigung_5']:
+            #    try:
+            #        cm_id = get_id_for_uuid(self.cursor, 'master', self.uuid)
+            #    except Expeption, e:
+            #        print "Exception, could not get ID from UUID: %s" % e
+            #    
+            #    cm_date_data = set()
+            #    if cm_id != None:
+            #        try:
+            #            cm_date_data = get_cm_dates(self.cursor, cm_id)
+            #        except Exception, e:
+            #            print "Exception while loading CM dates: %s" % e
+            #    
+            #    if cm_date_data != set():
+            #        #print cm_date_data
+            #        year, month, day = [int(x) for x in self.chars.strip().split("-")]
+            #        new_cm_date = datetime.date(year, month, day)
+            #        
+            #        if name == 'datum_feststellung':
+            #            old_cm_date = cm_date_data[0] # Start date of the CM
+            #        else:
+            #            old_cm_date = cm_date_data[1] # End date of the CM
+            #        
+            #        if old_cm_date != new_cm_date and new_cm_date < datetime.date(2010, 01, 01):
+            #            #print "new dates!"
+            #            # Error text not really important since it will not be passed to the user
+            #            raise StandardError("Datum darf nicht vor dem 1.1.2010 liegen")
+
             self.mode = EXPECT_FIELD
             self.chars = None
 



More information about the Mpuls-commits mailing list