-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AB#241073: Import from Kobo: filter project #55
AB#241073: Import from Kobo: filter project #55
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #55 +/- ##
===========================================
- Coverage 91.39% 91.32% -0.07%
===========================================
Files 151 151
Lines 4310 4323 +13
Branches 369 371 +2
===========================================
+ Hits 3939 3948 +9
- Misses 277 279 +2
- Partials 94 96 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -3,12 +3,6 @@ | |||
|
|||
class ImportKoboForm(forms.Form): | |||
batch_name = forms.CharField(required=False, help_text="Label for this batch") | |||
country_code = forms.CharField( | |||
required=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked how it is managed in HOPE? I'm not sure we are relying on country code right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but I was told to store country iso code in office and take it from there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about this. Please add a note here about how this will work with Kobo, how we will manage existing forms and what changes are needed in the various systems. HOPE BusinessArea does not represent a country, and it does not have any country attribute. (cc @ntrncic, @domdinicola).
@@ -5,6 +5,7 @@ | |||
|
|||
TENANT_TENANT_MODEL = "country_workspace.Office" | |||
TENANT_HQ = "= HQ =" | |||
TENANT_HQ_COUNTRY = "AFG" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this settings for? not sure we need to hardcode AFG anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For mandatory country_iso_code in HQ office
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like a bad side effect of a wrong decision to use country code in BA
@@ -12,6 +12,7 @@ class Office(BaseModel): | |||
code = models.CharField(max_length=100, blank=True, null=True, db_index=True, unique=True) | |||
slug = models.SlugField(max_length=100, blank=True, null=True, db_index=True, unique=True) | |||
active = models.BooleanField(default=False) | |||
country_iso_code = models.CharField(max_length=3, blank=False, null=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just do the field not mandatory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should client do when it's empty? Fetch all projects?
…o code is not set
Legal Boilerplate
Look, I get it.
Contributing to HOPE Workspace, I retain all rights, title and interest in and to my contributions, and by keeping
this boilerplate intact I confirm that HOPE Workspace can use, modify, copy, and redistribute my contributions,
under HOPE's choice of terms.