Skip to content
Open
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
40 changes: 21 additions & 19 deletions organization/choices.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
from django.utils.translation import gettext_lazy as _

inst_type = (
("", ""),
("agência de apoio à pesquisa", _("agência de apoio à pesquisa")),
(
"universidade e instâncias ligadas à universidades",
_("universidade e instâncias ligadas à universidades"),
),
(
"empresa ou instituto ligadas ao governo",
_("empresa ou instituto ligadas ao governo"),
),
("organização privada", _("organização privada")),
("organização sem fins de lucros", _("organização sem fins de lucros")),
(
"sociedade científica, associação pós-graduação, associação profissional",
_("sociedade científica, associação pós-graduação, associação profissional"),
),
("outros", _("outros")),
)

SOURCE_CHOICES = [
("user", _("user")),
("legacy", _("legacy")),
("MEC", _("Ministério da Educação e Cultura")),
("ror", _("Research Organization Registry")),
]


ORGANIZATION_ROLES = [
("coordinator", _("Coordinator")),
("owner", _("Owner")),
("publisher", _("Publisher")),
("sponsor", _("Sponsor")),
("copyright_holder", _("Copyright Holder")),
("partner", _("Partner")),
("funder", _("Funder")),
("host", _("Host")),
("provider", _("Provider")),
("company", _("Company")),
]
Comment on lines 1 to +23
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old inst_type choices have been completely removed without any migration path. If there is existing data in the database using these choices (stored in the removed institution_type_mec field), that data will be lost.

The removed choices included Portuguese terms like:

  • "agência de apoio à pesquisa"
  • "universidade e instâncias ligadas à universidades"
  • "empresa ou instituto ligadas ao governo"
  • "organização privada"
  • etc.

Before removing these, ensure:

  1. A data migration maps old values to new institution types in the OrganizationInstitutionType model
  2. Or document that these values are being intentionally discarded
  3. Or provide a migration script to preserve this data

This is related to the earlier comment about the field removal in the migration, but specifically calls out the loss of the choice values themselves.

Copilot uses AI. Check for mistakes.
Loading
Loading