Skip to content
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

Feature/46 product nl api #25

Merged
merged 8 commits into from
Jan 10, 2025
Merged

Feature/46 product nl api #25

merged 8 commits into from
Jan 10, 2025

Conversation

Floris272
Copy link
Contributor

@Floris272 Floris272 commented Jan 2, 2025

Fixes #

Changes

  • Adds producten app
  • fixes admin index fixture

@Floris272 Floris272 linked an issue Jan 2, 2025 that may be closed by this pull request
@Floris272 Floris272 force-pushed the feature/46-product-nl-api branch from a29bdbd to fe12f0a Compare January 6, 2025 14:30
@Floris272 Floris272 marked this pull request as ready for review January 6, 2025 14:36
@Floris272 Floris272 requested a review from Coperh January 6, 2025 14:36
@alextreme
Copy link
Member

@Coperh please review this PR today, this so we can prep an intermediate release of OP

Copy link

@Coperh Coperh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three things:

  • Product admin list crashes if there is any product.
  • Default admin index has onderwerp which no longer exists ( Probably renamed to thema)
  • The end date can be set to before the start date. I assume you don't want this and I think you should prevent it from happening now instead of in the future

src/open_producten/fixtures/default_admin_index.json Outdated Show resolved Hide resolved
src/open_producten/producten/admin/product.py Outdated Show resolved Hide resolved
src/open_producten/producten/admin/product.py Show resolved Hide resolved
Comment on lines 8 to 9
start_datum = factory.Faker("date")
eind_datum = factory.Faker("date")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was looking at here and the end date can be before the start date. The model and admin also allow it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made start & end date optional on the model as that would've happened in a future pr anyway and added validation so that they cannot be the same.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I more meant that this is valid:

start_datum = datetime.date(2024, 1, 2)
eind_datum = datetime.date(2024, 12, 31)

@Floris272 Floris272 requested a review from Coperh January 10, 2025 16:26
Copy link

@Coperh Coperh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think the start/end date is an issue but i'll approve

@Floris272 Floris272 merged commit c2c0ed8 into master Jan 10, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nederlandstalige API + Datamodel
3 participants