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
c6442dc8
Commit
c6442dc8
authored
Feb 06, 2020
by
Gladys Forte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{dev bugfix} remove prints
parent
83d6efe6
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
23 deletions
+3
-23
app/applicationlayer/cms/form/approver/serializers.py
app/applicationlayer/cms/form/approver/serializers.py
+1
-5
app/applicationlayer/cms/form/header/views.py
app/applicationlayer/cms/form/header/views.py
+1
-6
app/applicationlayer/cms/master/template/account/views.py
app/applicationlayer/cms/master/template/account/views.py
+0
-2
app/applicationlayer/cms/utils_cr.py
app/applicationlayer/cms/utils_cr.py
+0
-3
app/applicationlayer/download/accounts/views.py
app/applicationlayer/download/accounts/views.py
+0
-1
app/datalayer/serializer_handler.py
app/datalayer/serializer_handler.py
+0
-2
app/entities/models.py
app/entities/models.py
+1
-4
No files found.
app/applicationlayer/cms/form/approver/serializers.py
View file @
c6442dc8
...
@@ -8,7 +8,7 @@ class ChangeRequestFormApproversSerializer(
...
@@ -8,7 +8,7 @@ class ChangeRequestFormApproversSerializer(
):
):
def
to_representation
(
self
,
instance
):
def
to_representation
(
self
,
instance
):
ret
=
super
()
.
to_representation
(
instance
)
ret
=
super
()
.
to_representation
(
instance
)
print
(
instance
)
try
:
try
:
ret
[
'company'
]
=
{
ret
[
'company'
]
=
{
"id"
:
instance
.
user
.
department
.
company
.
id
,
"id"
:
instance
.
user
.
department
.
company
.
id
,
...
@@ -58,9 +58,6 @@ class ChangeRequestFormApproversSerializer(
...
@@ -58,9 +58,6 @@ class ChangeRequestFormApproversSerializer(
else
:
else
:
ret
[
'editable_deleg'
]
=
True
ret
[
'editable_deleg'
]
=
True
# print(instance.tmp_approver.delegation.name)
# comment
if
instance
.
tmp_approver
.
delegation
:
if
instance
.
tmp_approver
.
delegation
:
if
instance
.
tmp_approver
.
delegation
.
name
.
lower
()
==
'requestor'
:
if
instance
.
tmp_approver
.
delegation
.
name
.
lower
()
==
'requestor'
:
ret
[
'editable_user'
]
=
False
ret
[
'editable_user'
]
=
False
...
@@ -127,7 +124,6 @@ class ChangeRequestFormApproversSerializer(
...
@@ -127,7 +124,6 @@ class ChangeRequestFormApproversSerializer(
ret
[
'delegation'
]
=
None
ret
[
'delegation'
]
=
None
ret
[
'editable_deleg'
]
=
True
ret
[
'editable_deleg'
]
=
True
# print(instance.tmp_approver.delegation.name)
if
instance
.
tmp_approver
.
delegation
:
if
instance
.
tmp_approver
.
delegation
:
if
instance
.
tmp_approver
.
delegation
.
name
.
lower
()
==
'requestor'
:
if
instance
.
tmp_approver
.
delegation
.
name
.
lower
()
==
'requestor'
:
ret
[
'editable_user'
]
=
False
ret
[
'editable_user'
]
=
False
...
...
app/applicationlayer/cms/form/header/views.py
View file @
c6442dc8
...
@@ -552,9 +552,6 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
...
@@ -552,9 +552,6 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
form_code
=
str
(
form_code
)
form_code
=
str
(
form_code
)
)
.
values
(
'file_upload__url'
)
)
.
values
(
'file_upload__url'
)
attch_list
=
[
data
[
'file_upload__url'
]
.
split
(
'/'
)[
1
]
for
data
in
attch
]
attch_list
=
[
data
[
'file_upload__url'
]
.
split
(
'/'
)[
1
]
for
data
in
attch
]
# print(attch.query)
# print(attch)
# print(attch_list)
if
os
.
path
.
isdir
(
my_folder
):
if
os
.
path
.
isdir
(
my_folder
):
shutil
.
rmtree
(
my_folder
)
shutil
.
rmtree
(
my_folder
)
...
@@ -580,7 +577,6 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
...
@@ -580,7 +577,6 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
# full_file_name = os.path.join(my_folder, file_name)
# full_file_name = os.path.join(my_folder, file_name)
# if os.path.isfile(full_file_name):
# if os.path.isfile(full_file_name):
# shutil.copy(full_file_name, dest)
# shutil.copy(full_file_name, dest)
print
(
attch
)
for
file_name
in
attch
:
for
file_name
in
attch
:
print
(
file_name
[
'file_upload__url'
])
print
(
file_name
[
'file_upload__url'
])
...
@@ -588,7 +584,6 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
...
@@ -588,7 +584,6 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
# full_file_name = os.path.join(my_folder, file_name['file_upload__url'])
# full_file_name = os.path.join(my_folder, file_name['file_upload__url'])
# print(full_file_name)
# print(full_file_name)
if
os
.
path
.
isfile
(
a
):
if
os
.
path
.
isfile
(
a
):
print
(
'ddd'
)
print
(
a
)
print
(
a
)
# print(type(a))
# print(type(a))
b
=
open
(
a
,
'r'
)
b
=
open
(
a
,
'r'
)
...
...
app/applicationlayer/cms/master/template/account/views.py
View file @
c6442dc8
...
@@ -26,8 +26,6 @@ class UserListTemplate(APIView):
...
@@ -26,8 +26,6 @@ class UserListTemplate(APIView):
user_list
=
models
.
User
.
objects
.
filter
(
user_list
=
models
.
User
.
objects
.
filter
(
code__in
=
verified_users
code__in
=
verified_users
)
)
print
(
user_list
)
page
=
self
.
paginate_queryset
(
user_list
)
page
=
self
.
paginate_queryset
(
user_list
)
if
page
is
not
None
:
if
page
is
not
None
:
...
...
app/applicationlayer/cms/utils_cr.py
View file @
c6442dc8
...
@@ -396,11 +396,9 @@ def next_approver_email(form_code, next_level):
...
@@ -396,11 +396,9 @@ def next_approver_email(form_code, next_level):
level
=
str
(
next_level
),
level
=
str
(
next_level
),
form_code
=
form_code
form_code
=
form_code
)
)
# print(next_approver.values())
# LOOP on next approver for sending email
# LOOP on next approver for sending email
for
n_approver
in
next_approver
:
for
n_approver
in
next_approver
:
# print(n_approver.delegation)
# NOTIF MSG FOR NEXT APPROVER
# NOTIF MSG FOR NEXT APPROVER
msg
=
APPROVER_MESSAGE
.
split
(
';'
)[
0
]
msg
=
APPROVER_MESSAGE
.
split
(
';'
)[
0
]
...
@@ -564,7 +562,6 @@ def crhistory_log_bulk_delete_masterattach(queryset, entity, tbl, form_code,
...
@@ -564,7 +562,6 @@ def crhistory_log_bulk_delete_masterattach(queryset, entity, tbl, form_code,
try
:
try
:
for
data
in
queryset
:
for
data
in
queryset
:
test
=
model_to_dict
(
data
)
test
=
model_to_dict
(
data
)
# print(test)
crhistory_save
(
batch_no
,
crhistory_save
(
batch_no
,
main_action
,
main_action
,
enums
.
CREnum
.
DELETED
.
value
,
enums
.
CREnum
.
DELETED
.
value
,
...
...
app/applicationlayer/download/accounts/views.py
View file @
c6442dc8
...
@@ -28,7 +28,6 @@ class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet):
...
@@ -28,7 +28,6 @@ class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet):
data
=
User
.
objects
.
all
()
data
=
User
.
objects
.
all
()
serializer
=
headers
(
data
=
data
,
many
=
True
)
serializer
=
headers
(
data
=
data
,
many
=
True
)
serializer
.
is_valid
(
raise_exception
=
False
)
serializer
.
is_valid
(
raise_exception
=
False
)
print
(
serializer
.
data
)
return
Response
(
serializer
.
data
)
return
Response
(
serializer
.
data
)
column_header
=
{
column_header
=
{
...
...
app/datalayer/serializer_handler.py
View file @
c6442dc8
...
@@ -13,11 +13,9 @@ def custom_exception_handler(exc, context):
...
@@ -13,11 +13,9 @@ def custom_exception_handler(exc, context):
# Update the structure of the response data.
# Update the structure of the response data.
if
response
is
not
None
:
if
response
is
not
None
:
print
(
'dd'
)
error_message
=
{}
error_message
=
{}
for
key
,
value
in
response
.
data
.
items
():
for
key
,
value
in
response
.
data
.
items
():
print
(
value
)
if
type
(
value
)
==
list
and
value
[
0
]
.
code
==
'blank'
:
if
type
(
value
)
==
list
and
value
[
0
]
.
code
==
'blank'
:
value
=
value
[
0
]
.
replace
(
'This field'
,
key
)
value
=
value
[
0
]
.
replace
(
'This field'
,
key
)
# elif type(value) == dict:
# elif type(value) == dict:
...
...
app/entities/models.py
View file @
c6442dc8
...
@@ -266,8 +266,6 @@ class ExtractTransformLoad(AuditClass):
...
@@ -266,8 +266,6 @@ class ExtractTransformLoad(AuditClass):
def
save
(
self
,
*
args
,
**
kwargs
):
def
save
(
self
,
*
args
,
**
kwargs
):
super
(
ExtractTransformLoad
,
self
)
.
save
(
*
args
,
**
kwargs
)
super
(
ExtractTransformLoad
,
self
)
.
save
(
*
args
,
**
kwargs
)
code
=
number_generator
(
enums
.
GenerateCode
.
ETL
.
value
,
self
.
id
)
code
=
number_generator
(
enums
.
GenerateCode
.
ETL
.
value
,
self
.
id
)
print
(
type
(
self
.
code
))
if
self
.
code
==
''
or
self
.
code
==
None
:
if
self
.
code
==
''
or
self
.
code
==
None
:
self
.
code
=
code
self
.
code
=
code
...
@@ -527,7 +525,6 @@ class MasterAttachment(models.Model):
...
@@ -527,7 +525,6 @@ class MasterAttachment(models.Model):
attch_ref
=
models
.
TextField
()
attch_ref
=
models
.
TextField
()
def
delete
(
self
,
*
args
,
**
kwargs
):
def
delete
(
self
,
*
args
,
**
kwargs
):
# print(self.url.name)
if
os
.
path
.
isfile
(
self
.
url
.
path
):
if
os
.
path
.
isfile
(
self
.
url
.
path
):
os
.
remove
(
self
.
url
.
path
)
os
.
remove
(
self
.
url
.
path
)
...
...
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