Allow null user profile picture from Google OAuth in DB

- Fix width of generated profile picture generated for user
- Ignore unused Stripe webhook events
This commit is contained in:
Debanjum Singh Solanky
2023-11-09 00:15:08 -08:00
parent 1d3bdf8fdb
commit 605058c72a
4 changed files with 24 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
# Generated by Django 4.2.5 on 2023-11-09 08:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("database", "0013_subscription"),
]
operations = [
migrations.AlterField(
model_name="googleuser",
name="picture",
field=models.CharField(default=None, max_length=200, null=True),
),
]

View File

@@ -30,7 +30,7 @@ class GoogleUser(models.Model):
name = models.CharField(max_length=200)
given_name = models.CharField(max_length=200)
family_name = models.CharField(max_length=200)
picture = models.CharField(max_length=200)
picture = models.CharField(max_length=200, null=True, default=None)
locale = models.CharField(max_length=200)
def __str__(self):

View File

@@ -39,8 +39,12 @@
grid-template-columns: 1fr min(70vw, 100%) 1fr;
}
.circle {
width: 51px;
height: 51px;
width: 52px;
height: 52px;
}
.user-initial {
width: 40px;
height: 40px;
}
.page {

View File

@@ -40,7 +40,6 @@ async def subscribe(request: Request):
"invoice.paid",
"customer.subscription.updated",
"customer.subscription.deleted",
"subscription_schedule.canceled",
}:
logger.warn(f"Unhandled Stripe event type: {event['type']}")
return {"success": False}