Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit a4ee58d

Browse files
authored
Removes minimal models from pagination endpoints (#2932)
1 parent 15964e9 commit a4ee58d

File tree

8 files changed

+16
-10
lines changed

8 files changed

+16
-10
lines changed

src/dispatch/incident/priority/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ class IncidentPriorityReadMinimal(DispatchBase):
7777

7878
class IncidentPriorityPagination(DispatchBase):
7979
total: int
80-
items: List[IncidentPriorityReadMinimal] = []
80+
items: List[IncidentPriorityRead] = []

src/dispatch/incident/severity/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ class IncidentSeverityReadMinimal(DispatchBase):
7171

7272
class IncidentSeverityPagination(DispatchBase):
7373
total: int
74-
items: List[IncidentSeverityReadMinimal] = []
74+
items: List[IncidentSeverityRead] = []

src/dispatch/incident/type/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ class IncidentTypeReadMinimal(DispatchBase):
123123

124124
class IncidentTypePagination(DispatchBase):
125125
total: int
126-
items: List[IncidentTypeReadMinimal] = []
126+
items: List[IncidentTypeRead] = []

src/dispatch/participant_role/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ class ParticipantRoleReadMinimal(ParticipantRoleRead):
4545

4646
class ParticipantRolePagination(ParticipantRoleBase):
4747
total: int
48-
items: List[ParticipantRoleReadMinimal] = []
48+
items: List[ParticipantRoleRead] = []

src/dispatch/static/dispatch/src/tag/TagFilterAutoComplete.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,21 @@
2727
</template>
2828
<template v-slot:selection="{ item, index }">
2929
<v-chip close @click:close="value.splice(index, 1)">
30-
<span v-if="item.tag_type"> {{ item.tag_type.name }}/ </span>
30+
<span v-if="item.tag_type">
31+
<span v-if="!project">{{ item.project.name }}/</span>{{ item.tag_type.name }}/
32+
</span>
3133
<a :href="item.uri" target="_blank" :title="item.description">
3234
{{ item.name }}
3335
</a>
3436
</v-chip>
3537
</template>
3638
<template v-slot:item="data">
3739
<v-list-item-content>
38-
<v-list-item-title> {{ data.item.tag_type.name }}/{{ data.item.name }} </v-list-item-title>
40+
<v-list-item-title>
41+
<span v-if="!project">{{ data.item.project.name }}/</span>{{ data.item.tag_type.name }}/{{
42+
data.item.name
43+
}}
44+
</v-list-item-title>
3945
<v-list-item-subtitle style="width: 200px" class="text-truncate">
4046
{{ data.item.description }}
4147
</v-list-item-subtitle>

src/dispatch/static/dispatch/src/tag_type/TagTypeFilterCombobox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</template>
3333
<template v-slot:item="data">
3434
<v-list-item-content>
35-
<v-list-item-title> {{ data.item.name }} </v-list-item-title>
35+
<v-list-item-title> {{ data.item.project.name }}/{{ data.item.name }} </v-list-item-title>
3636
<v-list-item-subtitle style="width: 200px" class="text-truncate">
3737
{{ data.item.description }}
3838
</v-list-item-subtitle>

src/dispatch/tag/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ class TagReadMinimal(DispatchBase):
6464
uri: Optional[str] = Field(None, nullable=True)
6565
discoverable: Optional[bool] = True
6666
description: Optional[str] = Field(None, nullable=True)
67-
tag_type: Optional[TagTypeReadMinimal]
67+
tag_type: Optional[TagTypeRead]
6868

6969

7070
class TagPagination(DispatchBase):
71-
items: List[TagReadMinimal]
71+
items: List[TagRead]
7272
total: int

src/dispatch/tag_type/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ class TagTypeReadMinimal(DispatchBase):
4848

4949

5050
class TagTypePagination(DispatchBase):
51-
items: List[TagTypeReadMinimal]
51+
items: List[TagTypeRead]
5252
total: int

0 commit comments

Comments
 (0)