<reponame>code-review-doctor/amy
from django.contrib.postgres.forms import SplitArrayField


class FlexibleSplitArrayField(SplitArrayField):
    """Allow to dynamically change size of SplitArrayField and Widget."""

    def change_size(self, new_size: int):
        self.size = new_size
        self.widget.size = new_size

from django.contrib.postgres.forms import SplitArrayField


class FlexibleSplitArrayField(SplitArrayField):
    """Allow to dynamically change size of SplitArrayField and Widget."""

    def change_size(self, new_size: int):
        self.size = new_size
        self.widget.size = new_size
Allow to dynamically change size of SplitArrayField and Widget.