Skip to content

Add null check for AssignedOrguPosition before assigning.#11

Merged
mstuder merged 1 commit intofluxapps:mainfrom
thomas-neumann-axtesys:assigned_orgu_position_fix
Nov 24, 2023
Merged

Add null check for AssignedOrguPosition before assigning.#11
mstuder merged 1 commit intofluxapps:mainfrom
thomas-neumann-axtesys:assigned_orgu_position_fix

Conversation

@thomas-neumann-axtesys
Copy link
Contributor

Add a null check of the AssignedOrguPosition before calling the findOrCreateAssignment function to prevent the creation of erroneous entries to "il_orgu_ua" with position_id = 0 when AssignedOrguPosition is null.

This fix was created for a ILIAS 7 Installation that experienced a bug where UserDefaults created entries in the User-Org-Assignment table (il_orgu_ua) with position_id = 0, which does not exist. The reason for position 0 is the typecast in line 1555 to int, where null was typecast to 0 and inserted.

Add a null check of the AssignedOrguPosition before calling the findOrCreateAssignment function to prevent the creation of erroneous entries to "il_orgu_ua" with position_id = 0.
@mstuder
Copy link
Member

mstuder commented Nov 24, 2023

thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants