| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| def deserialize(self, value: list[int]) -> Record: | ||
| """Deserialize list of maps into a dict.""" | ||
| data = { | ||
| "timestamp": value[0], | ||
| "clean_time": value[1], | ||
| "clean_area": value[2], | ||
| "dust_collection": value[3], | ||
| } | ||
| return Record.from_dict(data) |
There was a problem hiding this comment.
This doesn't work with the timezone dialect so moved this logic to __pre_deserialize__.
Sorry, something went wrong.
| # We move time to the beginning so other modules can access the | ||
| # time and timezone after update if required. e.g. cleanrecords | ||
| if Time.__name__ in self._modules: | ||
| self._modules.move_to_end(Time.__name__, last=False) |
There was a problem hiding this comment.
Tbh, this feels rather icky and I would rather like to avoid it, but I suppose it is what it is :-)
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.