mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-24 18:41:45 -06:00
Fix syncing materials via API, show nice message
This commit is contained in:
parent
8dd6dd6573
commit
47237cda5f
12 changed files with 198 additions and 314 deletions
|
@ -1,16 +0,0 @@
|
|||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from .BaseModel import BaseModel
|
||||
|
||||
|
||||
class ClusterMaterial(BaseModel):
|
||||
def __init__(self, guid: str, version: int, **kwargs) -> None:
|
||||
self.guid = guid # type: str
|
||||
self.version = version # type: int
|
||||
super().__init__(**kwargs)
|
||||
|
||||
def validate(self) -> None:
|
||||
if not self.guid:
|
||||
raise ValueError("guid is required on ClusterMaterial")
|
||||
if not self.version:
|
||||
raise ValueError("version is required on ClusterMaterial")
|
Loading…
Add table
Add a link
Reference in a new issue