- def _do_POST_versioned_timestamps(self, cls: Any, attr_name: str) -> str:
- """Update history timestamps for VersionedAttribute."""
- id_ = self.params.get_int_or_none('id')
- item = cls.by_id(self.conn, id_)
- attr = getattr(item, attr_name)
- for k, v in self.form_data.get_first_strings_starting('at:').items():
- old = k[3:]
- if old[19:] != v:
- attr.reset_timestamp(old, f'{v}.0')
- attr.save(self.conn)
- cls_name = cls.__name__.lower()
- return f'/{cls_name}_{attr_name}s?id={item.id_}'
-