mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
STAR-322: Checking if response changed before updating cluster
This commit is contained in:
parent
2b8358fda8
commit
5b963de2ea
13 changed files with 58 additions and 30 deletions
|
@ -0,0 +1,17 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from ...Models import BaseModel
|
||||
|
||||
|
||||
class BaseCloudModel(BaseModel):
|
||||
def __eq__(self, other):
|
||||
return type(self) == type(other) and self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
return type(self) != type(other) or self.__dict__ != other.__dict__
|
||||
|
||||
@staticmethod
|
||||
def parseDate(date_str: str) -> datetime:
|
||||
return datetime.strptime(date_str, "%Y-%m-%dT%H:%M:%S.%fZ").replace(tzinfo=timezone.utc)
|
Loading…
Add table
Add a link
Reference in a new issue