Skip to content

Commit

Permalink
11664 fix principal user sql (#11665)
Browse files Browse the repository at this point in the history
* 11664 - Fix principal user SQL to only include users that still exist
* 11664 - Add entry to readme
bferguso authored Dec 4, 2024
1 parent 429603e commit 3597bd5
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arches/app/models/migrations/10999_update_principaluser.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ class Migration(migrations.Migration):
reverse_sql="select 1;",
),
migrations.RunSQL(
sql="update resource_instances a set principaluser_id = b.userid::integer from (select userid, resourceinstanceid from edit_log where edittype = 'create' and userid != '' and userid is not null)b where a.resourceinstanceid::text = b.resourceinstanceid",
sql="update resource_instances a set principaluser_id = b.userid::integer from (select userid, resourceinstanceid from edit_log where edittype = 'create' and userid != '' and userid is not null)b where a.resourceinstanceid::text = b.resourceinstanceid and b.userid::integer in (select id from auth_user)",
reverse_sql="select 1;",
),
# Moved from 10799_geojsongeometry_featureid in 7.6.2
1 change: 1 addition & 0 deletions releases/7.6.4.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
### Bug Fixes and Enhancements

- Remove unnecessary creation of guardian permissions for principal user #[11564](https://github.com/archesproject/arches/issues/11564)
- Fix migration that sets the initial principal users if a user no longer exists #[11664](https://github.com/archesproject/arches/issues/11664)
- Fix Graph Designer failure when editing large graphs #[11615](https://github.com/archesproject/arches/issues/11615)
- Fix failure to download exported search results when using non file-system based storages #[11620](https://github.com/archesproject/arches/issues/11620)
- Cache resource relationship preflabels to improve report load time #[11583](https://github.com/archesproject/arches/issues/11583)

0 comments on commit 3597bd5

Please sign in to comment.