Skip to content

Commit

Permalink
Update project creation
Browse files Browse the repository at this point in the history
  • Loading branch information
slafs committed Jan 24, 2016
1 parent 382c46b commit a84dbc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions scripts/create_team_or_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def create_admin(username, email, password):
return admin


def create_project(team_name, project_name, platform='python'):
def create_project(team_name, project_name):
team = Team.objects.get(name=team_name)
defaults = {'platform': platform, 'organization': team.organization}
defaults = {'organization': team.organization}
project, new = Project.objects.get_or_create(name=project_name, team=team,
defaults=defaults)

Expand Down Expand Up @@ -115,8 +115,7 @@ def main():
elif command in ('project', 'key'):
team_name = sys.argv[2]
project_name = sys.argv[3]
platform = sys.argv[4]
project, proj_created = create_project(team_name, project_name, platform)
project, proj_created = create_project(team_name, project_name)

if command == 'key':
key = sys.argv[4]
Expand Down
2 changes: 1 addition & 1 deletion sentry_run
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ "$1" == "start" ] || [ "$1" == "prepare" ]; then
if [ -n "$SENTRY_INITIAL_TEAM" ]; then
python $SCRIPTS_DIR/create_team_or_project.py team ${SENTRY_ADMIN_USERNAME:-admin} $SENTRY_INITIAL_TEAM
if [ -n "$SENTRY_INITIAL_PROJECT" ]; then
python $SCRIPTS_DIR/create_team_or_project.py project $SENTRY_INITIAL_TEAM $SENTRY_INITIAL_PROJECT ${SENTRY_INITIAL_PLATFORM:-python}
python $SCRIPTS_DIR/create_team_or_project.py project $SENTRY_INITIAL_TEAM $SENTRY_INITIAL_PROJECT
if [ -n "$SENTRY_INITIAL_KEY" ]; then
python $SCRIPTS_DIR/create_team_or_project.py key $SENTRY_INITIAL_TEAM $SENTRY_INITIAL_PROJECT $SENTRY_INITIAL_KEY
fi
Expand Down

0 comments on commit a84dbc8

Please sign in to comment.