Skip to content

Commit

Permalink
Fix registered repository update
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel José Bazán committed Nov 1, 2018
1 parent 337c95f commit 1f28e80
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ def validate_type(data, instance):
if instance:
if type_name and type_name != instance.type.name:
raise Conflict('The repository type cannot be changed')
repository_type = instance.type.name
repository_type = instance.type
else:
if not type_name:
raise Conflict('Please, specify the repository type')

repository_type = RepositoryType.query.filter_by(name=type_name).one_or_none()

if not repository_type:
Expand Down

0 comments on commit 1f28e80

Please sign in to comment.