(self, user)
return [Choice(SHOW_ALL_CHOICE, "[{}]".format(ugettext('Show All')))]
Return only the locations this user can access
Return only the locations this user can access
Return only the locations this user can access
def default_value(self, user):
        """Return only the locations this user can access
        """
        location = user.get_sql_location(self.domain)
        if location:
            return self._locations_to_choices([location])

        # If the user isn't assigned to a location, they have access to all locations
        return [Choice(SHOW_ALL_CHOICE, "[{}]".format(ugettext('Show All')))]
def default_value ( self , user ) : location = user . get_sql_location ( self . domain ) if location : return self . _locations_to_choices ( [ location ] ) # If the user isn't assigned to a location, they have access to all locations return [ Choice ( SHOW_ALL_CHOICE , "[{}]" . format ( ugettext ( 'Show All' ) ) ) ]