File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -199,10 +199,6 @@ async def update_kc_user(self, user: KCUserData) -> Optional[KCUserData]:
199
199
"enabled" : True ,
200
200
}
201
201
)
202
- for rofieldname in ("createTimestamp" , "modifyTimestamp" ):
203
- if rofieldname not in send_payload :
204
- continue
205
- del send_payload [rofieldname ]
206
202
if "attributes" not in send_payload :
207
203
send_payload ["attributes" ] = {
208
204
"callsign" : pdata .callsign ,
@@ -213,6 +209,11 @@ async def update_kc_user(self, user: KCUserData) -> Optional[KCUserData]:
213
209
"altUsernames" : [f"{ pdata .callsign } _{ productname } " for productname in manifest ["products" ].keys ()],
214
210
}
215
211
)
212
+ for rofieldname in ("createTimestamp" , "createdTimestamp" , "modifyTimestamp" ):
213
+ if rofieldname in send_payload :
214
+ del send_payload [rofieldname ]
215
+ if rofieldname in send_payload ["attributes" ]:
216
+ del send_payload ["attributes" ][rofieldname ]
216
217
LOGGER .debug ("Sending payload: {}" .format (send_payload ))
217
218
await self .kcadmin .a_update_user (user .kc_id , send_payload )
218
219
return await self ._refresh_user (user .kc_id , pdata )
You can’t perform that action at this time.
0 commit comments