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: incorrect date range when relinking files #23161

Conversation

TMF42
Copy link
Contributor

@TMF42 TMF42 commented Nov 8, 2023

PR: #22693 introduced a method to relink files before saving documents. Done by @maharshivpatel

One of the timestamps, to query recent file uploads is passed along as datetime.deltatime to frappe.db.exists, which causes exceptions with postgres DBs.

psycopg2.errors.InvalidDatetimeFormat: invalid input syntax for type timestamp: "0:59:59.999966" LINE 1: ...ttached_to_field"='attach' AND "creation" BETWEEN '0:59:59.9...

@TMF42 TMF42 requested review from a team and surajshetty3416 and removed request for a team November 8, 2023 20:35
@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label Nov 8, 2023
Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #23161 (df02636) into develop (1e7b45e) will increase coverage by 0.66%.
Report is 74 commits behind head on develop.
The diff coverage is 89.38%.

@@             Coverage Diff             @@
##           develop   #23161      +/-   ##
===========================================
+ Coverage    61.61%   62.27%   +0.66%     
===========================================
  Files          770      770              
  Lines        75270    73790    -1480     
  Branches      6361     6356       -5     
===========================================
- Hits         46378    45956     -422     
+ Misses       25271    24214    -1057     
+ Partials      3621     3620       -1     
Flag Coverage Δ
server 70.81% <89.38%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@TMF42
Copy link
Contributor Author

TMF42 commented Nov 12, 2023

imo, no additional tests are needed. It does however fix 1 failing test from the original PR in cypress/integration/control_attach.js

@ankush ankush added backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15 labels Nov 12, 2023
@mergify mergify bot merged commit b8d1ede into frappe:develop Nov 12, 2023
25 checks passed
@ankush
Copy link
Member

ankush commented Nov 12, 2023

This was also incorrect on MariaDB, probably just worked because mariadb is bit more forgiving.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
add-test-cases Add test case to validate fix or enhancement backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants