Disallow creation of product version with empty version name.
A product version with version name equals to null/empty/blank is implicitly created with the product. This patch disallows users to create versions with empty name. Change-Id: Iad477e486e23415ce20a9cd9367b9ef1a97173a4
This commit is contained in:
@@ -250,3 +250,6 @@ class ProductVersionValidator(BaseValidator):
|
||||
def validate(self, request):
|
||||
"""Validate product version data."""
|
||||
super(ProductVersionValidator, self).validate(request)
|
||||
body = json.loads(request.body)
|
||||
|
||||
self.check_emptyness(body, ['version'])
|
||||
|
||||
Reference in New Issue
Block a user