Skip to content

Commit

Permalink
test if group is not already set
Browse files Browse the repository at this point in the history
  • Loading branch information
tdraier committed Aug 1, 2024
1 parent 7a488e6 commit 0556ec5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions front/migrations/20240731_backfill_keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ async function backfillApiKeys(

const systemGroup = await GroupResource.fetchWorkspaceSystemGroup(auth);
const systemKey = await KeyResource.fetchSystemKeyForWorkspace(workspace);
if (systemKey) {
logger.info(`Backfilling system key ${systemKey.id} to globsystemal group`);
if (systemKey && !systemKey.groupId) {
logger.info(`Backfilling system key ${systemKey.id} to system group`);
if (execute) {
await KeyResource.model.update(
{ groupId: systemGroup.id },
Expand Down

0 comments on commit 0556ec5

Please sign in to comment.