diff --git a/apps/common/serializers/fields.py b/apps/common/serializers/fields.py index 4be566ab1..71a4672e2 100644 --- a/apps/common/serializers/fields.py +++ b/apps/common/serializers/fields.py @@ -122,7 +122,7 @@ class LabelRelatedField(serializers.RelatedField): from labels.models import LabeledResource, Label if data is None: return data - if isinstance(data, dict) and data.get("id"): + if isinstance(data, dict) and data.get("id") or data.get("pk"): pk = data.get("id") or data.get("pk") label = Label.objects.get(pk=pk) else: diff --git a/apps/i18n/lina/en.json b/apps/i18n/lina/en.json index a7c12d999..9658dd541 100644 --- a/apps/i18n/lina/en.json +++ b/apps/i18n/lina/en.json @@ -150,7 +150,7 @@ "AssetTree": "Asset tree", "Assets": "Assets", "AssetsAmount": "Assets", - "AssetsOfNumber": "Number of asset", + "AssetsOfNumber": "Assets", "AssetsTotal": "Total assets", "AssignedInfo": "Approval information", "Assignee": "Handler", diff --git a/apps/ops/serializers/job.py b/apps/ops/serializers/job.py index daeaf35a3..b66ab4202 100644 --- a/apps/ops/serializers/job.py +++ b/apps/ops/serializers/job.py @@ -49,7 +49,7 @@ class JobSerializer(BulkOrgResourceModelSerializer, PeriodTaskSerializerMixin): "run_after_save" ] extra_kwargs = { - 'average_time_cost': {'label': _('Average time taken')}, + 'average_time_cost': {'label': _('Duration')}, }