@@ -69,22 +69,23 @@ def updateStartDateEndDate(results, startdate, enddate):
6969 try :
7070 # raise CommandError(" start date "str(startdate)))
7171 #
72- Resultextensionpropertyvalues .objects .filter (resultid = results .resultid ).filter (
73- propertyid = StartDateProperty ).update (propertyvalue = startdate )
74- # repvstart.propertyvalue=startdate
75-
76- Resultextensionpropertyvalues .objects .filter (resultid = results .resultid ).filter (
77- propertyid = EndDateProperty ).update (propertyvalue = enddate )
78- # repvend.propertyvalue = enddate
72+ repvstart = Resultextensionpropertyvalues .objects .filter (resultid = results .resultid ).filter (
73+ propertyid = StartDateProperty ).get () #.update(propertyvalue=startdate)
74+ repvstart .propertyvalue = startdate
75+ repvstart .save ()
76+ repvend = Resultextensionpropertyvalues .objects .filter (resultid = results .resultid ).filter (
77+ propertyid = EndDateProperty ).get () #.update(propertyvalue=enddate)
78+ repvend .propertyvalue = enddate
79+ repvend .save ()
7980
8081 except ObjectDoesNotExist :
8182 # raise CommandError("couldn't find extension property values " +str(repvstart) + "for " +
8283 # str(StartDateProperty + "for" + str(results))
83- repvstart = Resultextensionpropertyvalues (resultid = results , propertyid = StartDateProperty ,
84+ repvstart = Resultextensionpropertyvalues (resultid = results . resultid , propertyid = StartDateProperty ,
8485 propertyvalue = startdate )
8586 # print(repvstart.propertyvalue)
8687 repvstart .save ()
87- repvend = Resultextensionpropertyvalues (resultid = results , propertyid = EndDateProperty ,
88+ repvend = Resultextensionpropertyvalues (resultid = results . resultid , propertyid = EndDateProperty ,
8889 propertyvalue = enddate )
8990 # print(repvend.propertyvalue)
9091 repvend .save ()
0 commit comments