Skip to content

Commit

Permalink
Release 5.11.20
Browse files Browse the repository at this point in the history
### Changelog:
* Fix(backend): add_in_vary typing.
* Fix(frontend): Objects list error displaying.
* Fix(frontend): Entered valued were not used new value is added to objects list.

Closes: vst/vst-utils#647+

See merge request vst/vst-utils!683
  • Loading branch information
onegreyonewhite committed Dec 17, 2024
2 parents 51dc245 + 3215c5c commit 5804444
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions frontend_src/vstutils/fields/base/BaseFieldMixin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
:value="value"
:data="data"
:hideable="hideable"
:error="error"
@hide-field="$emit('hide-field', field)"
@set-value="setValue"
@clear="clearValue"
Expand Down
1 change: 1 addition & 0 deletions frontend_src/vstutils/fields/base/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const FieldEditPropsDef = {
data: { type: Object as PropType<RepresentData>, required: true as const },
value: {},
hideable: { type: Boolean, default: false },
error: { type: [String, Object, Array], default: null },
};

export type FieldEditPropsDefType<T> = Omit<typeof FieldEditPropsDef, 'field' | 'value'> & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ModelFields
:model="modelClass"
:data="item.data"
:fieldsErrors="errorArray[idx]"
editable
flat-if-possible
flat-fields-classes="col-12"
Expand Down Expand Up @@ -68,6 +69,9 @@
};
});
});
const errorArray = computed(() => {
return Array.isArray(props.error) ? props.error : [];
});
const modelClass = props.field.itemField!.nestedModel!;
Expand Down Expand Up @@ -100,7 +104,7 @@
function setValue(options: SetFieldValueOptions) {
if (options.field) {
set(newItemData, options.field, options.value);
set(newItemData.value, options.field, options.value);
}
}
</script>
2 changes: 1 addition & 1 deletion vstutils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# pylint: disable=django-not-available
__version__: str = '5.11.19'
__version__: str = '5.11.20'
2 changes: 1 addition & 1 deletion vstutils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def get_session_store() -> 'SessionBase':
return engine.SessionStore


def add_in_vary(headers: dict, value: str):
def add_in_vary(headers, value):
"""
Adds provided value to Vary header if not added already
"""
Expand Down
3 changes: 2 additions & 1 deletion vstutils/utils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import asyncio
import logging
import subprocess
import typing as tp
from collections.abc import MutableMapping
from .tools import multikeysort as multikeysort
from collections.abc import Generator
from django.http.response import HttpResponse
Expand Down Expand Up @@ -531,7 +532,7 @@ class BaseEnum(str, VstEnum):
def get_session_store():
...

def add_in_vary(headers: dict, value: str):
def add_in_vary(headers: MutableMapping[str, str], value: str):
...

def check_request_etag(
Expand Down

0 comments on commit 5804444

Please sign in to comment.