YJDH-788 | Backend: Add organization type, job type & make business ID unique (+frontend translations)#3867
Conversation
Company.organization_type & EmployerSummerVoucher.job_type & their enumschecked that dev/test/staging/production have only unique business_id values in Company objects, so this should be safe to do refs YJDH-788
4f96694 to
12e322f
Compare
|
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3867.api.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3867.dev.hel.ninja 🚀🚀🚀 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3867.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3867.dev.hel.ninja 😆🎉🎉🎉 |
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3867.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://nuortenkesaseteli-pr3867.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://kesaseteli-pr3867.dev.hel.ninja 😆🎉🎉🎉 |
| # needs to be asked from the user. | ||
| max_length=64, | ||
| verbose_name=_("organization type"), | ||
| blank=True, |
There was a problem hiding this comment.
Just a note, that since NULL is not allowed, this blank string means that "question is seen, but left unanswered".
There was a problem hiding this comment.
Same here as in comment #3867 (comment)
| job_type = models.CharField( | ||
| max_length=64, | ||
| verbose_name=_("job type"), | ||
| blank=True, |
There was a problem hiding this comment.
Just a note, that since NULL is not allowed, this blank string means that "question is seen, but left unanswered".
There was a problem hiding this comment.
Yes, intentionally allowed empty string. This helps with e.g. old data and with the current way of handling employer applications/summer vouchers in the employer UI & backend (it saves partial data so data can be not set).
Also it's Django's best practice not to allow null for CharFields:
Avoid using null on string-based fields such as CharField and TextField.
The requirement can be handled at the UI level.



Description ✨
Company.organization_typeand OrganizationType enumEmployerSummerVoucher.job_typeand JobType enumCompany.business_iduniqueIssues 🐛
YJDH-788
Testing ⚗️
Screenshots 📸
Additional notes 🗒️