refactor: better sql

This commit is contained in:
Shivam Mishra
2019-06-06 11:30:56 +05:30
parent f121b51951
commit 624b4fd5b8
2 changed files with 2 additions and 2 deletions

View File

@@ -63,6 +63,6 @@ def allowed_content_access(program, content, content_type):
`tabtopic content`
where `tabcourse topic`.parent = `tabprogram course`.course
and `tabtopic content`.parent = `tabcourse topic`.topic
and `tabprogram course`.parent = '{0}'""".format(program))
and `tabprogram course`.parent = %(program)s""", {'program': program})
return (content, content_type) in contents_of_program