File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1838,6 +1838,12 @@ def _handle_realm_user_event(self, event: Event) -> None:
1838
1838
assert event ["type" ] == "realm_user"
1839
1839
if event ["op" ] == "update" :
1840
1840
updated_details = event ["person" ]
1841
+ # Role is not present under self.initial_data,
1842
+ # but exists only under self.initial_data["realm_users"]
1843
+ if "role" not in event ["person" ]:
1844
+ # check if the event contains details of current user or some other user in the org
1845
+ if updated_details ["user_id" ] == self .user_id :
1846
+ self .initial_data .update (updated_details )
1841
1847
for realm_user in self .initial_data ["realm_users" ]:
1842
1848
if realm_user ["user_id" ] == updated_details ["user_id" ]:
1843
1849
realm_user .update (updated_details )
You can’t perform that action at this time.
0 commit comments