home
·
contact
·
privacy
projects
/
plomtask
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
To Processes listing, add sortable effort column.
[plomtask]
/
plomtask
/
versioned_attributes.py
diff --git
a/plomtask/versioned_attributes.py
b/plomtask/versioned_attributes.py
index ab39df098059e416c7627b5fcefecae2668d7c06..b3442d7df1030b72b2990a21e12ffa12302aa9d1 100644
(file)
--- a/
plomtask/versioned_attributes.py
+++ b/
plomtask/versioned_attributes.py
@@
-51,6
+51,8
@@
class VersionedAttribute:
def at(self, queried_time: str) -> str | float:
"""Retrieve value of timestamp nearest queried_time from the past."""
def at(self, queried_time: str) -> str | float:
"""Retrieve value of timestamp nearest queried_time from the past."""
+ if len(queried_time) == 10:
+ queried_time += ' 23:59:59.999'
sorted_timestamps = sorted(self.history.keys())
if 0 == len(sorted_timestamps):
return self.default
sorted_timestamps = sorted(self.history.keys())
if 0 == len(sorted_timestamps):
return self.default
@@
-66,3
+68,7
@@
class VersionedAttribute:
db_conn.rewrite_relations(self.table_name, 'parent', self.parent.id_,
[[item[0], item[1]]
for item in self.history.items()])
db_conn.rewrite_relations(self.table_name, 'parent', self.parent.id_,
[[item[0], item[1]]
for item in self.history.items()])
+
+ def remove(self, db_conn: DatabaseConnection) -> None:
+ """Remove from DB."""
+ db_conn.delete_where(self.table_name, 'parent', self.parent.id_)