def get(self, user):
        ''' (User) -> UserPreferences

        Returns UserPreferences for given user.
        If does not exists, creates it.
        '''
        try:
            obj = super(UserPreferencesManager, self).get(user=user)
        except __HOLE__:
            obj = self.create(user=user)
        return obj
dataset/ETHPy150Open linkfloyd/linkfloyd/linkfloyd/preferences/models.py/UserPreferencesManager.get