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

Fix updatedAt field initialization in gdocs_posts #3839

Closed
wants to merge 1 commit into from

Conversation

larsyencken
Copy link
Contributor

@larsyencken larsyencken commented Aug 2, 2024

Fixes #3832

Fix the issue where gdocs_posts.updatedAt is often set to the Unix epoch instead of NULL.

  • db/model/Gdoc/GdocFactory.ts

    • Replace new Date(null) with null in the updatedAt field initialization.
    • Ensure updatedAt is explicitly set to NULL if no updates have occurred post create.
  • db/model/Post.ts

    • Replace new Date(null) with null in the updatedAt field initialization.
    • Ensure updatedAt is explicitly set to NULL if no updates have occurred post create.

Todo

  • Fix typechecks

Fixes #3832

Fix the issue where `gdocs_posts.updatedAt` is often set to the Unix epoch instead of `NULL`.

* **db/model/Gdoc/GdocFactory.ts**
  - Replace `new Date(null)` with `null` in the `updatedAt` field initialization.
  - Ensure `updatedAt` is explicitly set to `NULL` if no updates have occurred post create.

* **db/model/Post.ts**
  - Replace `new Date(null)` with `null` in the `updatedAt` field initialization.
  - Ensure `updatedAt` is explicitly set to `NULL` if no updates have occurred post create.
@larsyencken larsyencken marked this pull request as draft August 2, 2024 10:41
Copy link

This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected.

@github-actions github-actions bot added the stale label Aug 17, 2024
@marcelgerber marcelgerber requested a review from danyx23 August 19, 2024 12:47
@marcelgerber
Copy link
Member

@danyx23 could you have a look at this PR? It should fix #3832, right?

Copy link
Contributor

danyx23 commented Aug 19, 2024

@marcelgerber yes that looks like it should fix it. I haven't checked if this can come from other places as well but it's definitely good to fix these two

@github-actions github-actions bot removed the stale label Aug 20, 2024
Copy link

github-actions bot commented Sep 4, 2024

This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected.

@danyx23
Copy link
Contributor

danyx23 commented Sep 7, 2024

@larsyencken I think we can merge this

Copy link

This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected.

@github-actions github-actions bot added the stale label Sep 22, 2024
@github-actions github-actions bot closed this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gdocs_posts.updatedAt is often set to the unix epoch
3 participants