Skip to content

Commit

Permalink
Merge pull request #25 from gabrielbazan/fix_repository_update
Browse files Browse the repository at this point in the history
Fix Registered Repository Update
  • Loading branch information
gabrielbazan authored Nov 1, 2018
2 parents 337c95f + 1f28e80 commit 31c26cc
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 31c26cc

Please sign in to comment.