Commit ed16102b authored by Piergiorgio Pancino's avatar Piergiorgio Pancino

ParametersWardrobe: Fixes #804, error on reading Wardrobe created before

the adding of "_last_accessed" and "_creation_date"
parent e408953c
Pipeline #11510 passed with stages
in 39 minutes and 25 seconds
......@@ -1739,11 +1739,19 @@ class ParametersWardrobe(metaclass=ParametersType):
@property
def last_accessed(self):
return self._last_accessed
attr_name = "_last_accessed"
if not hasattr(self, attr_name):
self._proxy[attr_name] = datetime.datetime.now().strftime("%Y-%m-%d-%H:%M")
self._populate(attr_name)
return getattr(self, attr_name)
@property
def creation_date(self):
return self._creation_date
attr_name = "_creation_date"
if not hasattr(self, attr_name):
self._proxy[attr_name] = datetime.datetime.now().strftime("%Y-%m-%d-%H:%M")
self._populate(attr_name)
return getattr(self, attr_name)
if __name__ == "__main__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment