don't use postgres specific quoting style when no quotes are needed
fixes gh#211 test plan: * use the /api/v1/courses/{courseId}/recent_students endpoint with a mysql backend Change-Id: Id19944044cf6cce1e11a847b60c7d7294dd33c89 Reviewed-on: https://gerrit.instructure.com/13628 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
6858df5aec
commit
fbf1e53593
|
@ -243,8 +243,8 @@ class User < ActiveRecord::Base
|
|||
:select => 'users.*, MAX(current_login_at) as last_login, MAX(current_login_at) IS NULL as login_info_exists',
|
||||
# left outer join ensures we get the user even if they don't have a pseudonym
|
||||
:joins => sanitize_sql([<<-SQL, root_account_id]),
|
||||
LEFT OUTER JOIN "pseudonyms" ON pseudonyms.user_id = users.id AND pseudonyms.account_id = ?
|
||||
INNER JOIN "enrollments" ON enrollments.user_id = users.id
|
||||
LEFT OUTER JOIN pseudonyms ON pseudonyms.user_id = users.id AND pseudonyms.account_id = ?
|
||||
INNER JOIN enrollments ON enrollments.user_id = users.id
|
||||
SQL
|
||||
:conditions => enrollment_conditions,
|
||||
# the trick to get unique users
|
||||
|
|
Loading…
Reference in New Issue