We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d686807 commit 1a568d7Copy full SHA for 1a568d7
tests/test_peewee.py
@@ -68,3 +68,7 @@ def test_where(self):
68
create_items()
69
items = Item.select().where(Item.embedding.l2_distance([1, 1, 1]) < 1)
70
assert [v.id for v in items] == [1]
71
+
72
+ def test_get_or_create(self):
73
+ Item.get_or_create(id=1, defaults={'embedding': [1, 2, 3]})
74
+ Item.get_or_create(embedding=np.array([4, 5, 6]))
0 commit comments