Commit 7daee09
authored
Remove items whose value is None before dumping to JSON (#53)
Some add-on submissions, such as this one are failing.
The problem appears to be that optional values in the JSON metadata are being given a value of null, rather than omitted. Since null is a value, and the datatype for these keys is string, the validation fails.
Thus, remove any None values from the add-on metadata before dumping to JSON. I believe this is safe, as we have already validated that all required keys are present, so any Nones on the dataclass are optional keys that haven't been provided.1 parent 4aa1e8e commit 7daee09
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
| |||
0 commit comments