Skip to content

Commit

Permalink
remove app setting value max length (#1443)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Jun 20, 2024
1 parent cd9bb23 commit 00adfbb
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Removed
- Project starring timeline event creation (#1294)
- ``user_email_additional`` app setting (#874)
- ``get_visible_projects()`` template tag (#1432)
- App setting value max length limit (#1443)


v0.13.4 (2024-02-16)
Expand Down
1 change: 1 addition & 0 deletions docs/source/major_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Release Highlights
- Plugin API return data updates and deprecations
- Rename timeline app models
- Rename base test classes
- Remove app setting max length limit
- Remove Python v3.8 support
- Remove SAML SSO support

Expand Down
2 changes: 0 additions & 2 deletions projectroles/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
RemoteProject,
SODAR_CONSTANTS,
ROLE_RANKING,
APP_SETTING_VAL_MAXLENGTH,
CAT_DELIMITER,
CAT_DELIMITER_ERROR_MSG,
)
Expand Down Expand Up @@ -474,7 +473,6 @@ def _set_app_setting_field(self, plugin_name, s_field, s_key, s_val):
)
elif s_val['type'] == 'STRING':
self.fields[s_field] = forms.CharField(
max_length=APP_SETTING_VAL_MAXLENGTH,
widget=forms.TextInput(attrs=s_widget_attrs),
**setting_kwargs
)
Expand Down
20 changes: 20 additions & 0 deletions projectroles/migrations/0032_alter_appsetting_value.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.13 on 2024-06-20 14:31

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("projectroles", "0031_remotesite_owner_modifiable"),
]

operations = [
migrations.AlterField(
model_name="appsetting",
name="value",
field=models.CharField(
blank=True, help_text="Value of the setting", null=True
),
),
]
2 changes: 0 additions & 2 deletions projectroles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
('STRING', 'String'),
('JSON', 'Json'),
]
APP_SETTING_VAL_MAXLENGTH = 255
PROJECT_SEARCH_TYPES = ['project']
PROJECT_TAG_STARRED = 'STARRED'
CAT_DELIMITER = ' / '
Expand Down Expand Up @@ -935,7 +934,6 @@ class AppSetting(models.Model):

#: Value of the setting
value = models.CharField(
max_length=APP_SETTING_VAL_MAXLENGTH,
unique=False,
null=True,
blank=True,
Expand Down
2 changes: 0 additions & 2 deletions userprofile/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from projectroles.models import (
SODARUserAdditionalEmail,
SODAR_CONSTANTS,
APP_SETTING_VAL_MAXLENGTH,
ADD_EMAIL_ALREADY_SET_MSG,
)
from projectroles.plugins import get_active_plugins
Expand Down Expand Up @@ -97,7 +96,6 @@ def __init__(self, *args, **kwargs):
)
else:
self.fields[s_field] = forms.CharField(
max_length=APP_SETTING_VAL_MAXLENGTH,
widget=forms.TextInput(attrs=s_widget_attrs),
**setting_kwargs,
)
Expand Down

0 comments on commit 00adfbb

Please sign in to comment.