Skip to content

Conversation

@schoenkaft
Copy link
Contributor

@schoenkaft schoenkaft commented Nov 26, 2025

⚠️ Note: this is a PR diffed / to be merged into #187 (since it's based on the base importer there, and alters it).
The build of "Vve cursus/deelnemers" importer is next, which should be followed by a proper meeting/coordination with the client to come to a finalized Excel/CSV structure and import flow. I'd say this 80% it, but probably needs refinement later on in the proces.

Changes:

  • Added a LetterImporter class under the homeownerassociaton Django app;
  • Added an import_contacts management command, mainly for for manual testing right now, which will be superseded by an actual API (although both can live in parellel obviously);
  • Added some additional basic CSV parsing, since my current test-CSV only has one column (and therefore not delimiter);
  • Moved the HOA name lookup + optional DSO fetching when a HOA is not in our system to the base importer (to make things more DRY).
  • Added an is_imported flag to HomeownerAssociationCommunicationNote, so we can more easily identify if it was imported (vs. created manually).
  • For now added a simple combo of conditions to prevent double imports (e.g. when the script is ran multiple times). Conditions are "same hoa" + "same date" + is_imported=True. Thought matching it on exact description is risky, since any typo/change for an additional import would not match anymore. This addition could be a bit premature, but for now prevents me from having to delete many comm notes. Probably coordinating with the client in the near future could create a set of rules where we can prevent having to revert accidental (double, triple, etc...) imports (e.g. "Ow k*t, kunnen jullie deze 4000 communication notes toch verwijderen, want ik heb een foutje gemaakt"). Or we can simply await any import if there are no errors at all. Anyhow, to be refined... 🤞

Screenshot 2025-11-26 at 14 49 04
Screenshot 2025-11-26 at 15 25 46

@schoenkaft schoenkaft force-pushed the WON-410-vve-brief-importer branch from fbf9f5c to 367cd7e Compare November 26, 2025 11:55
@schoenkaft schoenkaft force-pushed the WON-410-vve-brief-importer branch from e3c8c36 to f754dc5 Compare November 26, 2025 12:33
@schoenkaft schoenkaft force-pushed the WON-410-vve-brief-importer branch from ccfbd55 to 5322ee5 Compare November 26, 2025 13:46
@schoenkaft schoenkaft marked this pull request as ready for review November 26, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants