Skip to content

Commit

Permalink
Merge 8af6f08 into 8403714
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Östberg committed Aug 7, 2019
2 parents 8403714 + 8af6f08 commit 31a9085
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions backend/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,14 +546,11 @@ def get(self, dataset):
dataset, _ = utils.parse_dataset(dataset)
dataset = db.get_dataset(dataset)
users = db.User.select()
access = (db.DatasetAccessCurrent
.select()
.where(
db.DatasetAccessCurrent.dataset == dataset,
))
access = (db.DatasetAccessCurrent.select()
.where(db.DatasetAccessCurrent.dataset == dataset))
query = peewee.prefetch(users, access)
self.finish({'data': _build_json_response(
query, lambda u: u.access_current)})
self.finish({'data': sorted(_build_json_response(
query, lambda u: u.access_current),key=lambda u: u['applyDate'])})


class UserDatasetAccess(handlers.SafeHandler):
Expand Down

0 comments on commit 31a9085

Please sign in to comment.