Skip to content

Commit

Permalink
blehhhhh
Browse files Browse the repository at this point in the history
  • Loading branch information
catgirlinspace committed Jul 14, 2024
1 parent 5757c4c commit 46769a5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
19 changes: 19 additions & 0 deletions assistant/migrations/0007_alter_sharedthread_uuid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 5.0.7 on 2024-07-14 22:16

import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('assistant', '0006_sharedthread'),
]

operations = [
migrations.AlterField(
model_name='sharedthread',
name='uuid',
field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False),
),
]
5 changes: 4 additions & 1 deletion assistant/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ def get_absolute_url(self):


class SharedThread(models.Model):
uuid = models.UUIDField(default=uuid.uuid4, editable=False)
uuid = models.UUIDField(default=uuid.uuid4, editable=False, db_index=True)
creator = models.ForeignKey('users.User', on_delete=models.CASCADE)
thread = models.ForeignKey(Thread, on_delete=models.CASCADE)
data = models.JSONField()

def get_absolute_url(self):
return reverse('assistant:view_shared_thread', args=[str(self.uuid)])

0 comments on commit 46769a5

Please sign in to comment.