Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Generated by Django 5.2.15 on 2026-09-15 19:02

import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("b2b", "0029_userb2bcontract"),
Comment thread
dsubak marked this conversation as resolved.
("users", "0044_alter_user_b2b_contracts"),
]

operations = [
migrations.AddField(
model_name="userb2bcontract",
name="consent_modified_at",
field=models.DateTimeField(blank=True, null=True),
),
migrations.AddField(
model_name="userb2bcontract",
name="consented_to_data_sharing",
field=models.BooleanField(null=True),
),
migrations.AddField(
model_name="userb2bcontract",
name="created_on",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
migrations.AddField(
model_name="userb2bcontract",
name="updated_on",
field=models.DateTimeField(auto_now=True),
),
]
4 changes: 3 additions & 1 deletion b2b/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ def is_organization_manager(user, org_id):
).exists()


class UserB2BContract(models.Model):
class UserB2BContract(TimestampedModel):
user = models.ForeignKey(
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE,
Expand All @@ -1006,6 +1006,8 @@ class UserB2BContract(models.Model):
on_delete=models.CASCADE,
related_name="b2b_contract_users",
)
consented_to_data_sharing = models.BooleanField(null=True)
consent_modified_at = models.DateTimeField(null=True, blank=True)

class Meta:
unique_together = ("user", "contract_page")
Expand Down
Loading