Spaces:
Sleeping
Sleeping
Commit
·
d5e187b
1
Parent(s):
6c9722e
fix entities error
Browse files- entities/entity.py +3 -2
entities/entity.py
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
-
|
|
|
2 |
import logging
|
3 |
|
4 |
@dataclass
|
5 |
class Entity:
|
6 |
-
data: dict =
|
7 |
|
8 |
def create(self, key: str, value: any):
|
9 |
if not isinstance(key, str) or value is None:
|
|
|
1 |
+
|
2 |
+
from dataclasses import dataclass, field
|
3 |
import logging
|
4 |
|
5 |
@dataclass
|
6 |
class Entity:
|
7 |
+
data: dict = field(default_factory=dict)
|
8 |
|
9 |
def create(self, key: str, value: any):
|
10 |
if not isinstance(key, str) or value is None:
|