removed lowercasing of usernames

This commit is contained in:
Bad_Investment
2021-05-06 00:44:35 +00:00
parent 781a8dc60a
commit 12ade79f95
2 changed files with 2 additions and 3 deletions

1
app.py
View File

@@ -106,7 +106,6 @@ async def upload_claims(request: Request, event_id: str, file: UploadFile = File
df['username'] = ''
df = df.fillna('')
df['username'] = df['username'].apply(lambda x: x.lower())
existing_claims = await Claim.objects.filter(event__id__exact=event_id).all()
existing_links = {c.link:c for c in existing_claims}

View File

@@ -15,7 +15,7 @@ class RedditBot:
self.client = client
async def message_handler(self, message: Message):
username = message.author.name.lower() if message.author else None
username = message.author.name if message.author else None
code = message.body.split(' ')[0].lower()
if code == 'ping':
@@ -76,7 +76,7 @@ class RedditBot:
logger.debug(f'Received request from {username} with invalid code {code}')
await message.mark_read()
response_message = ResponseMessage(secondary_id=comment.id, username=comment.author.name.lower(), created=comment.created_utc, body=comment.body, claim=claim)
response_message = ResponseMessage(secondary_id=comment.id, username=comment.author.name, created=comment.created_utc, body=comment.body, claim=claim)
await response_message.save()
async def run(self):