Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Feature flag for which repo to use in environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbashdown committed May 7, 2014
1 parent 212c3e2 commit c64ebb8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backdrop/core/repository.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

import json
import logging

import requests
import os

from backdrop.core.data_set import DataSetConfig
from backdrop.core.user import UserConfig
Expand Down Expand Up @@ -155,7 +155,11 @@ class UserConfigRepository(object):

def __init__(self, db):
self._db = db
self._repository = _Repository(db, UserConfig, "users", "email")
if 'USERS_USE_HTTP_REPO' in os.environ \
and os.environ['USERS_USE_HTTP_REPO']:
self._repository = HttpRepository(db, UserConfig, "users", "email")
else:
self._repository = _Repository(db, UserConfig, "users", "email")

def save(self, user_config):
self._repository.save(user_config)
Expand Down

0 comments on commit c64ebb8

Please sign in to comment.