Skip to content

Commit

Permalink
remove dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
nhumrich committed Feb 17, 2017
1 parent f4caf4a commit 0700b38
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions migrations/versions/21b664b587ce_create_initial_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ def upgrade():
op.bulk_insert(
envs_table,
[
{'name': 'Production'},
# just a place holder so nobody tries to create this environment
{'name': 'dev'}
{'name': 'Production'}
]
)

Expand Down
1 change: 0 additions & 1 deletion tmeister/dataaccess/toggleda.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ async def get_all_toggles():
environments.name AS env,
features.name AS feature,
CASE
WHEN environments.name = 'dev' THEN 'ON'
WHEN toggles.state IS NULL THEN 'OFF'
ELSE toggles.state
END AS state
Expand Down
4 changes: 1 addition & 3 deletions tmeister/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ async def get_toggle_states_for_env(request):
if not features:
return web.json_response({'Message': "No features provided"},
status=400)
if env == 'dev':
result = {feature: True for feature in features}
else:
result = await toggleda.get_toggle_states_for_env(env, features)
for f in features:
Expand Down Expand Up @@ -61,7 +59,7 @@ async def set_toggle_state(request):
else:
current_state = 'ON'

if env != 'dev' and current_state != state:
if current_state != state:
await permissions.check_toggle_permissions(user, env)
if env == 'Production' and state == 'ON':
await _toggle_all_for_feature(feature, state='ON')
Expand Down

0 comments on commit 0700b38

Please sign in to comment.