Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
205b8ced
Commit
205b8ced
authored
Mar 19, 2020
by
Gladys Forte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{devbugfix} asset serializer unavaible key count
parent
1588b3dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/applicationlayer/ams/asset/serializers.py
app/applicationlayer/ams/asset/serializers.py
+3
-1
app/applicationlayer/ams/asset_stock/views.py
app/applicationlayer/ams/asset_stock/views.py
+0
-1
No files found.
app/applicationlayer/ams/asset/serializers.py
View file @
205b8ced
...
...
@@ -9,7 +9,9 @@ class AMSAssetSerializer(serializers.ModelSerializer):
ret
[
'asset_type'
]
=
instance
.
asset_type
.
name
ret
[
'in_qty'
]
=
instance
.
ams_asset_to_assetdetail
.
filter
(
status
=
'In-Store'
)
.
count
()
ret
[
'out_qty'
]
=
instance
.
ams_asset_to_assetdetail
.
filter
(
status
=
'Deployed'
)
.
count
()
ret
[
'unavailable'
]
=
instance
.
ams_asset_to_assetdetail
.
filter
(
status
=
'Faulty'
)
.
count
()
ret
[
'unavailable'
]
=
instance
.
ams_asset_to_assetgroup
.
filter
(
status__in
=
[
'Faulty'
,
'Returned'
,
'Written Off'
]
)
.
count
()
ret
[
'created_by'
]
=
instance
.
created_by
.
name
return
ret
...
...
app/applicationlayer/ams/asset_stock/views.py
View file @
205b8ced
...
...
@@ -164,7 +164,6 @@ class AMSAssetStockViewSet(viewsets.ModelViewSet):
status
=
status
.
HTTP_200_OK
)
@
action
(
methods
=
[
'PATCH'
],
detail
=
True
,
url_path
=
'restore'
,
url_name
=
'restore'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment