Demo data: seed_demo writes a contact address the form rejects, a Paris job translated to Lisbon and a real LEI #423
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#423
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, readingseed_demoand running it with its default seed on an in-memory database.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atjobs/models.py:627(Contact.email) andjobs/forms.py:578(ContactForm);seed_demo.pyand the other locations are unchanged.Three pieces of the data
seed_demowrites are wrong. A contact gets an email address that Postulo's own contact form refuses, so the contact cannot be saved again until the address is rewritten. The one translated CV entry, there to show what a French CV prints, moves the job to another city. A fictional company carries a well-formed LEI that appears to belong to a real company, under a comment that calls the identifiers made up. The demo is how a newcomer judges Postulo, and its rows are written withobjects.createandbulk_create, which validate nothing, so none of this is caught.CONTACT_NAMESincore/management/commands/seed_demo.py:143-150; the contact creation inCommand._seedatcore/management/commands/seed_demo.py:556-566, withemail=f"{contact_name.split()[0].lower()}@{website.removeprefix('https://')}";Contact.email, anEmailField, atjobs/models.py:624;ContactFormatjobs/forms.py:581, whoseMeta.fieldsincludeemail.Experience(Weyland-Yutani,location="Paris") atcore/management/commands/seed_demo.py:385-398; the FrenchTranslationrows forexperiences[0]atcore/management/commands/seed_demo.py:757-774.DEMO_IDENTIFIERSand its comment atcore/management/commands/seed_demo.py:81-90; the LEI scheme's link and example atplugins/identifiers/schemes.py:196-197.EmailValidatoraccepts only ASCII in the local part. With the default--seed 2026the run creates four contacts: Anna Schmidt at Wonka Industries, Inês Carvalho at Aperture Science, Luc Moreau at Tyrell Corporation and Marie Dubois at Stark Industries. Inês's address isinês@aperture.example, andfull_clean()on that row answers "Enter a valid email address." Someone trying the demo who opens that contact, changes its role or notes and saves it gets that error on a field they never touched. Other seeds can pick João, with the same result."location": "Lisbonne"onexperiences[0], whose location is Paris. Lisbon is the city ofexperiences[1](Massive Dynamic). The French summary, "J'ai maintenu en service ce dont les autres équipes dépendaient.", is not a translation of "Platform team for the logistics product." either. Rendered in French, the demo CV shows the Weyland-Yutani job in Lisbon, which is the opposite of what a translation feature should demonstrate.HWUPKR0MPOU8FGXBT394, passes the ISO 17442 mod-97 check. It is the value the LEI scheme uses as its ownexample, and it appears to be the LEI that GLEIF lists for Apple Inc. The company page links each identifier to its register (https://search.gleif.org/#/record/{value}for an LEI), so the fictional employer leads to a real company's record. The comment aboveDEMO_IDENTIFIERSsays "The ids are made up, as the companies are", and Getting started in the wiki (Getting-started.md:129) says "Everything it creates is obviously invented".tests/test_seed_demo.pynever validates what the seeder creates, so this kind of drift goes unnoticed.unicodedata.normalize("NFKD", first).encode("ascii", "ignore").decode().lower(), or give eachCONTACT_NAMESentry an explicit address. Leave the displayed names unchanged.DEMO_IDENTIFIERSthe same way, and correct the comment to say what they are. If they are the real Wikidata items about the fictional companies, say that.Done when
tests/test_seed_demo.py: afterseed_demo --no-pdfwith the default seed and with a seed that picks João,full_clean()passes on everyContactthe account holds. It fails today oninês@aperture.example.tests/test_seed_demo.py: the seeded French translation of the first experience's location is the French name of that experience's own city. It fails today with "Lisbonne" against "Paris".tests/test_seed_demo.py: no seededCompanyIdentifierwith the schemeleiholdsHWUPKR0MPOU8FGXBT394. It fails today for Initech.