pearmut 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pearmut-0.2.3 → pearmut-0.2.4}/PKG-INFO +1 -1
- {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/PKG-INFO +1 -1
- {pearmut-0.2.3 → pearmut-0.2.4}/pyproject.toml +1 -1
- {pearmut-0.2.3 → pearmut-0.2.4}/server/app.py +2 -2
- {pearmut-0.2.3 → pearmut-0.2.4}/server/cli.py +2 -3
- {pearmut-0.2.3 → pearmut-0.2.4}/server/static/assets/style.css +4 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/server/static/listwise.bundle.js +1 -1
- {pearmut-0.2.3 → pearmut-0.2.4}/server/static/pointwise.bundle.js +1 -1
- {pearmut-0.2.3 → pearmut-0.2.4}/LICENSE +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/README.md +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/SOURCES.txt +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/dependency_links.txt +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/entry_points.txt +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/requires.txt +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/top_level.txt +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/server/assignment.py +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/server/static/assets/favicon.svg +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/server/static/dashboard.bundle.js +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/server/static/dashboard.html +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/server/static/index.html +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/server/static/listwise.html +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/server/static/pointwise.html +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/server/utils.py +0 -0
- {pearmut-0.2.3 → pearmut-0.2.4}/setup.cfg +0 -0
|
@@ -147,10 +147,10 @@ class DashboardDataRequest(BaseModel):
|
|
|
147
147
|
async def _dashboard_data(request: DashboardDataRequest):
|
|
148
148
|
campaign_id = request.campaign_id
|
|
149
149
|
|
|
150
|
-
is_privileged = (request.token == tasks_data[campaign_id]["token"])
|
|
151
|
-
|
|
152
150
|
if campaign_id not in progress_data:
|
|
153
151
|
return JSONResponse(content={"error": "Unknown campaign ID"}, status_code=400)
|
|
152
|
+
|
|
153
|
+
is_privileged = (request.token == tasks_data[campaign_id]["token"])
|
|
154
154
|
|
|
155
155
|
progress_new = {}
|
|
156
156
|
assignment = tasks_data[campaign_id]["info"]["assignment"]
|
|
@@ -65,11 +65,10 @@ def _add_single_campaign(data_file, overwrite, server):
|
|
|
65
65
|
progress_data = json.load(f)
|
|
66
66
|
|
|
67
67
|
if campaign_data['campaign_id'] in progress_data and not overwrite:
|
|
68
|
-
|
|
69
|
-
f"Campaign {campaign_data['campaign_id']} already exists
|
|
68
|
+
raise ValueError(
|
|
69
|
+
f"Campaign {campaign_data['campaign_id']} already exists.\n"
|
|
70
70
|
"Use -o to overwrite."
|
|
71
71
|
)
|
|
72
|
-
exit(1)
|
|
73
72
|
|
|
74
73
|
if "info" not in campaign_data:
|
|
75
74
|
raise ValueError("Campaign data must contain 'info' field.")
|