Skip to content

Commit

Permalink
Fix getboolean
Browse files Browse the repository at this point in the history
  • Loading branch information
mboudet committed Jan 28, 2021
1 parent 5610927 commit 5b104ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions askomics/api/sparql.py
Expand Up @@ -12,7 +12,7 @@


def can_access(user):
login_allowed = current_app.iniconfig.get('askomics', 'enable_sparql_console', fallback=False)
login_allowed = current_app.iniconfig.getboolean('askomics', 'enable_sparql_console', fallback=False)
return login_allowed or user['admin']


Expand All @@ -26,8 +26,6 @@ def init():
json
"""
try:

raise Exception("admin: {}, login: {}, can access: {}".format(session['user']['admin'], current_app.iniconfig.get('askomics', 'enable_sparql_console', fallback=False), can_access(session['user'])))
# Disk space
files_utils = FilesUtils(current_app, session)
disk_space = files_utils.get_size_occupied_by_user() if "user" in session else None
Expand Down
2 changes: 0 additions & 2 deletions tests/test_api_sparql.py
Expand Up @@ -25,8 +25,6 @@ def test_init(self, client):
content = content.replace("###SIZE###", str(client.get_size_occupied_by_user()))
expected = json.loads(content)

print(response.json)

assert response.status_code == 200
assert self.equal_objects(response.json, expected)

Expand Down

0 comments on commit 5b104ae

Please sign in to comment.