Skip to content

Commit

Permalink
fixed: get_records() on Event model could have SQL error due to lack …
Browse files Browse the repository at this point in the history
…of space
  • Loading branch information
odscjames committed Oct 4, 2023
1 parent 17de332 commit fdd5908
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]


### Fixed

- get_records() on Event model could have SQL error due to lack of space

## [0.7.0] - 2022-10-26

### Added
Expand Down
2 changes: 1 addition & 1 deletion jsondataferret/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_records(self, limit=-1, approved_edits_only=False):
+ (
"WHERE jsondataferret_edit.approval_event_id = %(event_id)s "
if approved_edits_only
else "WHERE jsondataferret_edit.creation_event_id = %(event_id)s OR jsondataferret_edit.refusal_event_id = %(event_id)s OR jsondataferret_edit.approval_event_id = %(event_id)s"
else "WHERE jsondataferret_edit.creation_event_id = %(event_id)s OR jsondataferret_edit.refusal_event_id = %(event_id)s OR jsondataferret_edit.approval_event_id = %(event_id)s "
)
+ "GROUP BY jsondataferret_record.id "
+ "ORDER BY max(jsondataferret_type.title) ASC, jsondataferret_record.public_id ASC"
Expand Down

0 comments on commit fdd5908

Please sign in to comment.