File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
pythononwheels/start/models Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,14 @@ def rollback_dirty(self, name=None):
5151 Look at session.rollback() Bfor SQL or accordinug for mongoDB > 4 or other transation capable DBs
5252 """
5353 if self .is_dirty :
54- if name :
54+ if name in self . dirty :
5555 # only rollback attribute changes for name
5656 try :
5757 setattr (self , name , self .dirty [name ]["value" ])
58+ self .dirty .pop (name , None )
59+ # check if still elements in dirty
60+ if not self .dirty :
61+ self .is_dirty = False
5862 except Exception as e :
5963 print ("ERROR Dirty rollback : {}" .format (str (e )))
6064 # else: rollback all changes
@@ -183,7 +187,8 @@ def init_observers(self):
183187 self .__class__ .observers_initialized = True
184188 self .__class__ .observers .append (o )
185189 except Exception as e :
186- print (" ... Found None: {}" .format (str (e ) ))
190+ self .__class__ .observers_initialized = True
191+ #print (" ... Found None: {}".format(str(e) ))
187192
188193 def api (self ):
189194 """ just for conveniance """
Original file line number Diff line number Diff line change 88
99
1010setup (name = 'pythononwheels' ,
11- version = '0.85b ' ,
11+ version = '0.852b ' ,
1212 description = 'The simple, quick and easy generative web framework for python' ,
1313 long_description = long_description ,
1414 classifiers = [
You can’t perform that action at this time.
0 commit comments