Skip to content

Commit

Permalink
Merge pull request #5183 from kobotoolbox/task-1082-update-organizati…
Browse files Browse the repository at this point in the history
…on-form-in-admin-to-enable-multi-members

[TASK-1082] Add `mmo_override` field to Organization model with admin control
  • Loading branch information
noliveleger authored Oct 25, 2024
2 parents 1e84b71 + bd03a54 commit aa69fa1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.2.15 on 2024-10-22 10:36

from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('organizations', '0001_squashed_0004_remove_organization_uid'),
]

operations = [
migrations.AddField(
model_name='organization',
name='mmo_override',
field=models.BooleanField(
default=False, verbose_name='Multi-members override'
),
),
]
4 changes: 4 additions & 0 deletions kobo/apps/organizations/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.db.models import F
from django_request_cache import cache_for_request

Expand All @@ -21,6 +22,9 @@

class Organization(AbstractOrganization):
id = KpiUidField(uid_prefix='org', primary_key=True)
mmo_override = models.BooleanField(
default=False, verbose_name='Multi-members override'
)

@cache_for_request
def active_subscription_billing_details(self):
Expand Down

0 comments on commit aa69fa1

Please sign in to comment.