mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-10 13:26:13 +00:00
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:
17
src/database/migrations/0014_alter_googleuser_picture.py
Normal file
17
src/database/migrations/0014_alter_googleuser_picture.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -30,7 +30,7 @@ class GoogleUser(models.Model):
|
|||||||
name = models.CharField(max_length=200)
|
name = models.CharField(max_length=200)
|
||||||
given_name = models.CharField(max_length=200)
|
given_name = models.CharField(max_length=200)
|
||||||
family_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)
|
locale = models.CharField(max_length=200)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|||||||
@@ -39,8 +39,12 @@
|
|||||||
grid-template-columns: 1fr min(70vw, 100%) 1fr;
|
grid-template-columns: 1fr min(70vw, 100%) 1fr;
|
||||||
}
|
}
|
||||||
.circle {
|
.circle {
|
||||||
width: 51px;
|
width: 52px;
|
||||||
height: 51px;
|
height: 52px;
|
||||||
|
}
|
||||||
|
.user-initial {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ async def subscribe(request: Request):
|
|||||||
"invoice.paid",
|
"invoice.paid",
|
||||||
"customer.subscription.updated",
|
"customer.subscription.updated",
|
||||||
"customer.subscription.deleted",
|
"customer.subscription.deleted",
|
||||||
"subscription_schedule.canceled",
|
|
||||||
}:
|
}:
|
||||||
logger.warn(f"Unhandled Stripe event type: {event['type']}")
|
logger.warn(f"Unhandled Stripe event type: {event['type']}")
|
||||||
return {"success": False}
|
return {"success": False}
|
||||||
|
|||||||
Reference in New Issue
Block a user