validate_user_settings
validate_user_settings(*, user, backend, db)
async
¶
Get a UserSettings object and validate it based on a given Fractal backend.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user |
UserOAuth
|
The user whose settings we should validate. |
required |
backend |
str
|
The value of |
required |
db |
AsyncSession
|
An async DB session |
required |
Returns:
Type | Description |
---|---|
UserSettings
|
|
Source code in fractal_server/app/routes/aux/validate_user_settings.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
verify_user_has_settings(user)
¶
Check that the user.user_settings_id
foreign-key is set.
NOTE: This check will become useless when we make the foreign-key column required, but for the moment (as of v2.6.0) we have to keep it in place.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user |
UserOAuth
|
The user to be checked. |
required |
Source code in fractal_server/app/routes/aux/validate_user_settings.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|