Closed EricAtORS closed 1 year ago
Thanks @EricAtORS , will have a look shortly. Just out of curiosity, can you please post the minimal example that was failing?
Hi @aanastasiou
Of course. I've added it to the test suite. This is the minimal reproducible example:
from neomodel import IntegerProperty, StringProperty
from neomodel.contrib import SemiStructuredNode
class UserProf(SemiStructuredNode):
email = StringProperty(unique_index=True, required=True)
age = IntegerProperty(index=True)
def test_to_save_to_model_with_required_only():
u = UserProf(email="dummy@test.com")
assert u.save()
@EricAtORS Can you please describe the error you were getting? (I am getting an error indeed, but I would like us to confirm that we are talking about the same thing).
@EricAtORS Disregard please, I see what the problem was now.
@aanastasiou I hadn't seen the udpated, but just in case you still need it:
File "...\lib\site-packages\neomodel\contrib\semi_structured.py", line 61, in deflate
raise DeflateConflict(cls, key, deflated[key], obj.id)
KeyError: 'description'
Thanks for the udpate
Merging #699 (e8c1b2f) into rc/5.1.0 (f07b331) will increase coverage by
0.10%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## rc/5.1.0 #699 +/- ##
============================================
+ Coverage 89.46% 89.56% +0.10%
============================================
Files 15 15
Lines 1994 1994
============================================
+ Hits 1784 1786 +2
+ Misses 210 208 -2
Impacted Files | Coverage Δ | |
---|---|---|
neomodel/contrib/semi_structured.py | 85.29% <100.00%> (+5.88%) |
:arrow_up: |
@mariusconjeaud Thank you!
I was trying to create a semi structured node with only the required values present and it would fail. This PR fixes it. I've added a test to demonstrate the use case I have.