Make images belong to one repository only. Add a description field to the repository. Fix a bug with access tokens. Fix an embarrasing bug with multiple select criteria in peewee. Update the test db.
This commit is contained in:
parent
5caa54ffb3
commit
23cbcb2979
6 changed files with 79 additions and 67 deletions
|
@ -14,6 +14,7 @@ from auth.auth import process_auth, extract_namespace_repo_from_session
|
|||
from util import checksums
|
||||
from auth.permissions import (ReadRepositoryPermission,
|
||||
ModifyRepositoryPermission)
|
||||
from data import model
|
||||
|
||||
|
||||
store = storage.load()
|
||||
|
@ -286,6 +287,9 @@ def put_image_json(namespace, repository, image_id):
|
|||
abort(409) #'Image already exists', 409)
|
||||
# If we reach that point, it means that this is a new image or a retry
|
||||
# on a failed push
|
||||
# save the metadata
|
||||
model.set_image_metadata(image_id, namespace, repository,
|
||||
data.get('created'), data.get('comment'))
|
||||
store.put_content(mark_path, 'true')
|
||||
store.put_content(json_path, request.data)
|
||||
generate_ancestry(namespace, repository, image_id, parent_id)
|
||||
|
|
Reference in a new issue