mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-17 16:50:53 +00:00
fix: update user limit settings key in migration and frontend form for consistency with other settings keys.
This commit is contained in:
parent
46d4063524
commit
7e6041286a
3 changed files with 6 additions and 6 deletions
|
|
@ -7,8 +7,8 @@ from django.utils.text import slugify
|
|||
def preload_user_limit_settings(apps, schema_editor):
|
||||
CoreSettings = apps.get_model("core", "CoreSettings")
|
||||
CoreSettings.objects.create(
|
||||
key="user_limits",
|
||||
name="User Limits",
|
||||
key="user_limit_settings",
|
||||
name="User Limit Settings",
|
||||
value={},
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ PROXY_SETTINGS_KEY = "proxy_settings"
|
|||
NETWORK_ACCESS_KEY = "network_access"
|
||||
SYSTEM_SETTINGS_KEY = "system_settings"
|
||||
EPG_SETTINGS_KEY = "epg_settings"
|
||||
USER_LIMITS_SETTINGS_KEY = "user_limits"
|
||||
USER_LIMITS_SETTINGS_KEY = "user_limit_settings"
|
||||
|
||||
|
||||
class CoreSettings(models.Model):
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ const UserLimitsForm = React.memo(({ active }) => {
|
|||
|
||||
useEffect(() => {
|
||||
if (settings) {
|
||||
if (settings['user_limits']?.value) {
|
||||
if (settings['user_limit_settings']?.value) {
|
||||
userLimitSettingsForm.setValues({
|
||||
...USER_LIMIT_DEFAULTS,
|
||||
...settings['user_limits'].value,
|
||||
...settings['user_limit_settings'].value,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ const UserLimitsForm = React.memo(({ active }) => {
|
|||
|
||||
try {
|
||||
const result = await updateSetting({
|
||||
...settings['user_limits'],
|
||||
...settings['user_limit_settings'],
|
||||
value: userLimitSettingsForm.getValues(),
|
||||
});
|
||||
if (result) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue