Skip to content

Commit 990ccb9

Browse files
committed
Change default return type of Generic to None #10
1 parent f6bb4a8 commit 990ccb9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

objectbox/model/entity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def get_value(self, object, prop: Property):
9797
if prop._py_type == datetime:
9898
return datetime.fromtimestamp(0)
9999
if prop._py_type == Generic:
100-
return {}
100+
return None
101101
else:
102102
return prop._py_type() # default (empty) value for the given type
103103
return val

tests/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def assert_equal(actual: TestEntity, expected: TestEntity):
7676
assert_equal_prop_approx(actual.doubles_list, expected.doubles_list, [])
7777
assert_equal_prop_approx(actual.date, expected.date, 0)
7878
assert_equal_prop(actual.date_nano, expected.date_nano, 0)
79-
assert_equal_prop(actual.flex, expected.flex, {})
79+
assert_equal_prop(actual.flex, expected.flex, None)
8080

8181

8282
def put_flex(object, box, property):

0 commit comments

Comments
 (0)