Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
cooperatic-foodcoops
third-party
Commits
96786768
Commit
96786768
authored
Aug 18, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some some fixes
parent
ddcbb3a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
manage_attached.js
members/static/js/admin/manage_attached.js
+0
-1
views.py
orders/views.py
+4
-4
models.py
shelfs/models.py
+1
-2
No files found.
members/static/js/admin/manage_attached.js
View file @
96786768
...
@@ -284,7 +284,6 @@ function create_pair(payload) {
...
@@ -284,7 +284,6 @@ function create_pair(payload) {
data
.
responseJSON
.
errors
.
map
(
function
(
error
)
{
data
.
responseJSON
.
errors
.
map
(
function
(
error
)
{
message
+=
(
'
\
n'
+
error
);
message
+=
(
'
\
n'
+
error
);
return
null
;
return
null
;
});
});
}
}
...
...
orders/views.py
View file @
96786768
...
@@ -123,7 +123,7 @@ def get_orders_attachment(request):
...
@@ -123,7 +123,7 @@ def get_orders_attachment(request):
for
item
in
res
:
for
item
in
res
:
if
'error'
in
item
:
if
'error'
in
item
:
return
JsonResponse
(
res
,
status
=
500
)
return
JsonResponse
(
res
,
status
=
500
,
safe
=
False
)
return
JsonResponse
({
'res'
:
res
})
return
JsonResponse
({
'res'
:
res
})
...
@@ -133,6 +133,7 @@ def export_one(request, oid):
...
@@ -133,6 +133,7 @@ def export_one(request, oid):
oid
=
int
(
oid
)
oid
=
int
(
oid
)
order
=
Order
(
oid
)
order
=
Order
(
oid
)
order_data
=
order
.
export
()
order_data
=
order
.
export
()
if
(
'success'
in
order_data
)
and
(
order_data
[
'success'
]
is
True
):
if
(
'success'
in
order_data
)
and
(
order_data
[
'success'
]
is
True
):
now
=
datetime
.
datetime
.
now
()
now
=
datetime
.
datetime
.
now
()
taxes
=
0
taxes
=
0
...
@@ -176,7 +177,7 @@ def export_one(request, oid):
...
@@ -176,7 +177,7 @@ def export_one(request, oid):
# return response
# return response
except
Exception
as
e
:
except
Exception
as
e
:
msg
=
str
(
e
)
msg
=
str
(
e
)
coop_logger
.
error
(
"Order export error :
%
s"
,
msg
)
return
JsonResponse
({
"msg"
:
msg
},
safe
=
False
)
return
JsonResponse
({
"msg"
:
msg
},
safe
=
False
)
def
export_regex
(
request
,
string
):
def
export_regex
(
request
,
string
):
...
@@ -258,4 +259,4 @@ def print_product_labels(request):
...
@@ -258,4 +259,4 @@ def print_product_labels(request):
res
[
'errors'
]
.
append
(
pres
)
res
[
'errors'
]
.
append
(
pres
)
except
Exception
as
e
:
except
Exception
as
e
:
res
[
'error_ext'
]
=
str
(
e
)
res
[
'error_ext'
]
=
str
(
e
)
return
JsonResponse
({
'res'
:
res
},
safe
=
False
)
return
JsonResponse
({
'res'
:
res
},
safe
=
False
)
\ No newline at end of file
shelfs/models.py
View file @
96786768
...
@@ -591,4 +591,4 @@ class Shelfs(models.Model):
...
@@ -591,4 +591,4 @@ class Shelfs(models.Model):
except
Exception
as
e
:
except
Exception
as
e
:
res
[
'error'
]
=
str
(
e
)
res
[
'error'
]
=
str
(
e
)
coop_logger
.
error
(
"Rayons, make_products_shelf_links :
%
s"
,
str
(
e
))
coop_logger
.
error
(
"Rayons, make_products_shelf_links :
%
s"
,
str
(
e
))
return
res
return
res
\ No newline at end of file
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