Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions steakweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ async def create_extn(request):
await init_db_pool()

name = data.get('name', '')
publish = 't' if data.get('publish') else 'f'
publish = bool(data.get('publish'))
if data['type'] == 'sip':
switch = 11
authcode = gen_sip_pw()
Expand Down Expand Up @@ -187,7 +187,7 @@ async def publish_extn(request):
if check_auth_isadmin(session):
n = await dbconn.execute("UPDATE registered_extensions SET publish = $2 WHERE extn = $1", int(data['extn']), data.get('published', '0')== '1')
else:
n = await dbconn.execute("UPDATE registered_extensions SET publish = $2 WHERE extn = $1 AND userid = $3", int(data['extn']), data.get('publish', '1') == '1', int(session['uid']))
n = await dbconn.execute("UPDATE registered_extensions SET publish = $2 WHERE extn = $1 AND userid = $3", int(data['extn']), data.get('published', '0') == '1', int(session['uid']))

if n != 'UPDATE 1':
session['error'] = 'Could not change directory name; contact support'
Expand Down