You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
forcing the post creation date at the model/repository level, whenever we create a post in the database. This is generally reasonable behavior, but it doesn't work well when we are doing i.e. data import using our repository classes. This sort of thing rather belongs at the API level.
Setting the creation date at the model/repository level still needs to happen, but only if no date has been set for the Post entity.
On our v5 branch, this is already being done at the HTTP controller level:
Currently we've got this line of code
https://github.com/ushahidi/platform/blob/d6c575f/src/App/Repository/PostRepository.php#L1177
forcing the post creation date at the model/repository level, whenever we create a post in the database. This is generally reasonable behavior, but it doesn't work well when we are doing i.e. data import using our repository classes. This sort of thing rather belongs at the API level.
Setting the creation date at the model/repository level still needs to happen, but only if no date has been set for the Post entity.
On our v5 branch, this is already being done at the HTTP controller level:
https://github.com/ushahidi/platform/blob/f9e2fdf/v5/Http/Controllers/PostController.php#L113
but are we setting a proper default at the model level? Couldn't find anything explicit here:
https://github.com/ushahidi/platform/blob/f9e2fdf901d10939899a67b1c35ff2633fb47a98/v5/Models/Post.php
Could you please confirm this @rowasc?
Aha! Link: https://ushahiditeam.aha.io/features/PROD-788
The text was updated successfully, but these errors were encountered: