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

Commit

Permalink
Use get_user_repository for get correct user repo
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbashdown committed May 8, 2014
1 parent b811404 commit af39e33
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
17 changes: 9 additions & 8 deletions backdrop/admin/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
session, render_template, flash, redirect, abort

from .. import statsd
from ..core import cache_control, log_handler, database
from ..core.data_set import DataSet
from ..core.errors import ParseError, ValidationError
from ..core.repository \
import DataSetConfigRepository, UserConfigRepository
from ..core.flaskutils import DataSetConverter
from ..core.upload import create_parser
from backdrop.core import cache_control, log_handler, database
from backdrop.core.data_set import DataSet
from backdrop.core.errors import ParseError, ValidationError
from backdrop.core.repository import (
DataSetConfigRepository,
get_user_repository)
from backdrop.core.flaskutils import DataSetConverter
from backdrop.core.upload import create_parser
from .signonotron2 import Signonotron2
from .uploaded_file import UploadedFile, FileUploadError

Expand All @@ -37,7 +38,7 @@
app.config['STAGECRAFT_URL'],
app.config['STAGECRAFT_DATA_SET_QUERY_TOKEN'])

user_repository = UserConfigRepository(db)
user_repository = get_user_repository(app)


# TODO: move this out into a helper
Expand Down
4 changes: 2 additions & 2 deletions backdrop/write/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from backdrop.core.data_set import DataSet
from backdrop.core.flaskutils import DataSetConverter
from backdrop.core.repository import (DataSetConfigRepository,
UserConfigRepository)
get_user_repository)

from ..core.errors import ParseError, ValidationError
from ..core import database, log_handler, cache_control
Expand Down Expand Up @@ -35,7 +35,7 @@
app.config['STAGECRAFT_URL'],
app.config['STAGECRAFT_DATA_SET_QUERY_TOKEN'])

user_repository = UserConfigRepository(db)
user_repository = get_user_repository(app)

log_handler.set_up_logging(app, GOVUK_ENV)

Expand Down
2 changes: 2 additions & 0 deletions tasks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#TODO: Remove these tasks when users moved to stagecraft
#and data-sets and users collections are deleted
import json
import os
from invoke import task
Expand Down

0 comments on commit af39e33

Please sign in to comment.