skalarsystems / fhirzeug

A Python FHIR specification parser and class generator
Apache License 2.0
17 stars 1 forks source link

Remove null objects from list in _without_empty_object #57

Closed Wauplin closed 4 years ago

Wauplin commented 4 years ago

I detected a new bug when working on the tag attribute. At the moment, the behavior of _without_empty_object is as follow :

My use case :

code = r4.Coding() # No error since all fields are optional
meta = r4.Meta(tag=[code]) 
meta.dict() # Throws an error instead of an empty dictionnary
codecov[bot] commented 4 years ago

Codecov Report

Merging #57 into master will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
+ Coverage   82.88%   82.89%   +0.01%     
==========================================
  Files          11       11              
  Lines        1291     1292       +1     
==========================================
+ Hits         1070     1071       +1     
  Misses        221      221              
Flag Coverage Δ
#unittests 82.89% <100.00%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ators/python_pydantic/templates/resource_header.py 98.70% <100.00%> (+0.01%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8343b66...d03d5f7. Read the comment docs.