Milimetric has submitted this change and it was merged.
Change subject: default project is required
......................................................................
default project is required
Change-Id: If8d77afe70e541e3e287b210f3d1c093cd6c9e76
---
M wikimetrics/models/cohort.py
M wikimetrics/templates/csv_upload_form.html
2 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
Milimetric: Verified; Looks good to me, approved
diff --git a/wikimetrics/models/cohort.py b/wikimetrics/models/cohort.py
index 4ff0143..a0be4ae 100644
--- a/wikimetrics/models/cohort.py
+++ b/wikimetrics/models/cohort.py
@@ -78,4 +78,4 @@
# note: the below line is more concise but harder to read
#return ((project, (r[0] for r in users)) for project, users in groups)
for project, users in groups:
- yield project, (r[0] for r in users)
+ yield project or self.cohort.default_project, (r[0] for r in users)
diff --git a/wikimetrics/templates/csv_upload_form.html
b/wikimetrics/templates/csv_upload_form.html
index 716f8cb..3385b2c 100644
--- a/wikimetrics/templates/csv_upload_form.html
+++ b/wikimetrics/templates/csv_upload_form.html
@@ -5,7 +5,7 @@
<div class="control-group">
<label for="name" class="control-label">Name</label>
<div class="controls">
- <input type="text" name="name" id="name" value="{% if name
%}{{name}}{% endif %}"/>
+ <input type="text" name="name" class="required" id="name"
value="{% if name %}{{name}}{% endif %}"/>
<label for="name">(automatically checks availability)</label>
</div>
</div>
@@ -18,7 +18,7 @@
<div class="control-group">
<label for="project" class="control-label">Default Project</label>
<div class="controls">
- <input type="text" name="project" id="project" value="{% if
project %}{{project}}{% endif %}"/>
+ <input type="text" name="project" class="required" id="project"
value="{% if project %}{{project}}{% endif %}"/>
</div>
</div>
<div class="control-group">
--
To view, visit https://gerrit.wikimedia.org/r/74261
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If8d77afe70e541e3e287b210f3d1c093cd6c9e76
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric <[email protected]>
Gerrit-Reviewer: Milimetric <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits