Skip to content

Commit

Permalink
handle empyt UUID correctly in JSON, by assigning new UUID (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
InnocentBug authored Aug 2, 2023
1 parent 741ea81 commit 585c344
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cript/nodes/uuid_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import uuid
from abc import ABC
from dataclasses import dataclass, replace
from dataclasses import dataclass, field, replace
from typing import Any, Dict

from cript.nodes.core import BaseNode
Expand All @@ -24,7 +24,7 @@ class JsonAttributes(BaseNode.JsonAttributes):
All shared attributes between all Primary nodes and set to their default values
"""

uuid: str = ""
uuid: str = field(default_factory=lambda: str(uuid.uuid4()))
updated_by: Any = None
created_by: Any = None
created_at: str = ""
Expand Down

0 comments on commit 585c344

Please sign in to comment.