Implement editing of profile repos directly (#204)

This commit is contained in:
Arseniy authored and GitHub committed 2024-03-11 19:34:13 -04:00
1 parent 5f1e653eba
commit 1e3ea617e7
1 file changed
+8
+8
View File
@@ -229,6 +229,14 @@ def profile_config(request):
profile.repos.pop(engine, False)
changes += 'Deleted Engine: %s\n' % (engine)
for (engine, current_repo) in profile.repos.items():
repo_name = request.POST.get('engine-repo-%s' % (engine), '').removesuffix('/')
repo = 'https://github.com/%s' % (repo_name)
if repo != current_repo and repo_name:
changes += 'Updated Engine: %s to use %s\n' % (engine, repo)
profile.repos[engine] = repo
if changes:
profile.save()