Commit a895e80b authored by John Red Medrano's avatar John Red Medrano

change status code return on file format download etl

parent 43fe7931
...@@ -198,7 +198,7 @@ class BatchUploadViewSet(viewsets.ModelViewSet): ...@@ -198,7 +198,7 @@ class BatchUploadViewSet(viewsets.ModelViewSet):
) )
return Response( return Response(
{"message": message}, {"message": message},
status=status.HTTP_400_BAD_REQUEST status=status.HTTP_200_OK
) )
@transaction.atomic @transaction.atomic
...@@ -264,7 +264,7 @@ class BatchUploadViewSet(viewsets.ModelViewSet): ...@@ -264,7 +264,7 @@ class BatchUploadViewSet(viewsets.ModelViewSet):
) )
default_app = Application.objects.filter( default_app = Application.objects.filter(
excel_code=keys['default_app'] excel_code=keys['Default_app']
).first() ).first()
dept_code = Department.objects.get( dept_code = Department.objects.get(
......
...@@ -130,7 +130,6 @@ class Company(AuditClass): ...@@ -130,7 +130,6 @@ class Company(AuditClass):
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
super(Company, self).save(*args, **kwargs) super(Company, self).save(*args, **kwargs)
if self.code == 'com': if self.code == 'com':
print(self.code)
code = enums.GenerateCode.APP.value code = enums.GenerateCode.APP.value
code = number_generator(enums.GenerateCode.COMPANY.value, self.id) code = number_generator(enums.GenerateCode.COMPANY.value, self.id)
Company.objects.filter(id=self.id).update(code=code) Company.objects.filter(id=self.id).update(code=code)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment