Skip to content

Commit

Permalink
fix(backend): remove header from exported csv file
Browse files Browse the repository at this point in the history
  • Loading branch information
Adibov committed Dec 5, 2023
1 parent dfa9c9e commit 4aa2af8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/backend_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class Meta:

@property
def username(self) -> str:
return f'{self.user.account.email.split("@")[0]}_workshop_{self.workshop.id}'
return f'{self.user.account.email.split("@")[0]}_w_{self.workshop.id}'


class PresentationParticipation(models.Model):
Expand All @@ -317,7 +317,7 @@ class Meta:

@property
def username(self) -> str:
return f'{self.user.account.email.split("@")[0]}_presentation_{self.presentation.id}'
return f'{self.user.account.email.split("@")[0]}_p_{self.presentation.id}'


class Misc(models.Model):
Expand Down
1 change: 0 additions & 1 deletion backend/utils/skyroom_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def convert_credentials_to_csv_response(credentials: list[SkyroomCredentials]) -
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = 'attachment; filename="login_credentials.csv"'
writer = csv.writer(response)
writer.writerow(['username', 'password', 'full_name', 'room', 'access'])
for credential in credentials:
writer.writerow([credential.username, credential.password, credential.full_name, 'aaiss', 'normal'])
return response

0 comments on commit 4aa2af8

Please sign in to comment.