mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-08 05:58:43 +02:00
Fix XmlModel to load an empty string in an int field as None
This commit is contained in:
@@ -594,6 +594,8 @@ class XmlModel(BaseModel):
|
||||
return value
|
||||
|
||||
if field.origin_type is int:
|
||||
if not value or not value.strip():
|
||||
return None
|
||||
value = int(value)
|
||||
return value
|
||||
|
||||
|
Reference in New Issue
Block a user