human
Solve the following python programming problem given the following code:
@ quickcache (['user._id', 'project.name', 'only_editable'], timeout = 10) 
def _user_locations_ids(user, project, only_editable) : 
    def all_ids() : 
        return SQLLocation.by_domain (project.name).values_list ('location_id', flat = True) 
if (user.is_domain_admin (user.name) or (not project.location_restriction_for_users)) : 
        return all_ids () 
user_loc = (user.get_location (project.name) if isinstance (user, WebUser) else user.location) 
    if (not user_loc) : 
        return all_ids () 
editable = list (user_loc.sql_location.get_descendants (include_self = True).values_list ('location_id', flat = True)) 
    if only_editable : 
        return editable 
else : 
        viewable = list (user_loc.sql_location.get_ancestors ().values_list ('location_id', flat = True)) 
        return (viewable + editable) 

    
    

    Fix the buggy line: if (user.is_domain_admin (user.name) or (not project.location_restriction_for_users)) :
assistant
#Here is Python code to fix the buggy line: if (user.

if (user.is_domain_admin (project.name) or (not project.location_restriction_for_users)) :