diff options
Diffstat (limited to 'ogcp/views.py')
-rw-r--r-- | ogcp/views.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index 406de44..8494d4f 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -1233,9 +1233,14 @@ def action_image_create(): f"| {PART_TYPE_CODES[part.get('code')]} " f"{FS_CODES[part.get('filesystem')]}") ) + r = server.get('/client/info', payload={'client': list(ips)}) + client_repo_id = r.json()['repo_id'] repositories = get_repositories(server) + form.repository.choices = [ (repo['id'], repo['name']) for repo in repositories + if client_repo_id == repo['id']] for repo in repositories: - form.repository.choices.append((repo['id'], repo['name'])) + if client_repo_id != repo['id']: + form.repository.choices.append((repo['id'], repo['name'])) scopes, clients = get_scopes(set(ips)) return render_template('actions/image_create.html', form=form, |