Skip to content

Instantly share code, notes, and snippets.

@j00bar
Last active March 8, 2016 20:43
Show Gist options
  • Save j00bar/27801878c88e910d5d1b to your computer and use it in GitHub Desktop.
Save j00bar/27801878c88e910d5d1b to your computer and use it in GitHub Desktop.
if cred.user:
if cred.created_by == cred.user:
convert_cred_to_user_cred(cred)
else:
conver_cred_to_org_cred(cred)
give_user_role_on_cred(cred, cred.user)
elif cred.team:
convert_cred_to_org_cred(cred)
give_team_role_on_cred(cred, cred.team)
elif is_used_by_job_template(cred):
convert_cred_to_org_cred(cred)
else:
orphan_and_log(cred)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment