Skip to content

Commit c6d92fd

Browse files
authored
fix regression introduced in #18320 (#18327)
closes #18326
1 parent bc73124 commit c6d92fd

File tree

3 files changed

+60
-58
lines changed

3 files changed

+60
-58
lines changed

warehouse/locale/messages.pot

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ msgstr ""
408408
msgid "This project name has already been used. Choose a different project name."
409409
msgstr ""
410410

411-
#: warehouse/manage/forms.py:538
411+
#: warehouse/manage/forms.py:551
412412
msgid "Cannot transfer to Company Organization with inactive billing"
413413
msgstr ""
414414

@@ -1215,7 +1215,7 @@ msgstr ""
12151215
#: warehouse/templates/manage/project/release.html:209
12161216
#: warehouse/templates/manage/project/settings.html:85
12171217
#: warehouse/templates/manage/project/settings.html:131
1218-
#: warehouse/templates/manage/project/settings.html:370
1218+
#: warehouse/templates/manage/project/settings.html:372
12191219
#: warehouse/templates/manage/team/settings.html:62
12201220
msgid "Warning"
12211221
msgstr ""
@@ -1588,9 +1588,9 @@ msgstr ""
15881588
#: warehouse/templates/manage/project/roles.html:364
15891589
#: warehouse/templates/manage/project/roles.html:397
15901590
#: warehouse/templates/manage/project/roles.html:416
1591-
#: warehouse/templates/manage/project/settings.html:274
1592-
#: warehouse/templates/manage/project/settings.html:290
1593-
#: warehouse/templates/manage/project/settings.html:306
1591+
#: warehouse/templates/manage/project/settings.html:276
1592+
#: warehouse/templates/manage/project/settings.html:292
1593+
#: warehouse/templates/manage/project/settings.html:308
15941594
#: warehouse/templates/manage/team/roles.html:104
15951595
#: warehouse/templates/manage/team/settings.html:22
15961596
#: warehouse/templates/packaging/submit-malware-observation.html:54
@@ -1904,9 +1904,9 @@ msgstr ""
19041904
#: warehouse/templates/manage/project/history.html:295
19051905
#: warehouse/templates/manage/project/history.html:306
19061906
#: warehouse/templates/manage/project/history.html:317
1907-
#: warehouse/templates/manage/project/settings.html:217
1908-
#: warehouse/templates/manage/project/settings.html:272
1909-
#: warehouse/templates/manage/project/settings.html:277
1907+
#: warehouse/templates/manage/project/settings.html:219
1908+
#: warehouse/templates/manage/project/settings.html:274
1909+
#: warehouse/templates/manage/project/settings.html:279
19101910
#: warehouse/templates/manage/unverified-account.html:102
19111911
msgid "Name"
19121912
msgstr ""
@@ -4773,7 +4773,7 @@ msgstr ""
47734773
#: warehouse/templates/manage/project/publishing.html:255
47744774
#: warehouse/templates/manage/project/publishing.html:329
47754775
#: warehouse/templates/manage/project/roles.html:373
4776-
#: warehouse/templates/manage/project/settings.html:327
4776+
#: warehouse/templates/manage/project/settings.html:329
47774777
#: warehouse/templates/manage/team/roles.html:125
47784778
msgid "Add"
47794779
msgstr ""
@@ -5877,7 +5877,7 @@ msgstr ""
58775877
#: warehouse/templates/manage/organization/roles.html:352
58785878
#: warehouse/templates/manage/project/release.html:96
58795879
#: warehouse/templates/manage/project/releases.html:98
5880-
#: warehouse/templates/manage/project/settings.html:244
5880+
#: warehouse/templates/manage/project/settings.html:246
58815881
msgid "Delete"
58825882
msgstr ""
58835883

@@ -6305,9 +6305,9 @@ msgstr ""
63056305
#: warehouse/templates/manage/project/history.html:296
63066306
#: warehouse/templates/manage/project/history.html:307
63076307
#: warehouse/templates/manage/project/history.html:318
6308-
#: warehouse/templates/manage/project/settings.html:218
6309-
#: warehouse/templates/manage/project/settings.html:288
6310-
#: warehouse/templates/manage/project/settings.html:293
6308+
#: warehouse/templates/manage/project/settings.html:220
6309+
#: warehouse/templates/manage/project/settings.html:290
6310+
#: warehouse/templates/manage/project/settings.html:295
63116311
msgid "Url"
63126312
msgstr ""
63136313

@@ -6936,8 +6936,8 @@ msgid "Remove project"
69366936
msgstr ""
69376937

69386938
#: warehouse/templates/manage/project/settings.html:104
6939-
#: warehouse/templates/manage/project/settings.html:176
6940-
#: warehouse/templates/manage/project/settings.html:444
6939+
#: warehouse/templates/manage/project/settings.html:178
6940+
#: warehouse/templates/manage/project/settings.html:446
69416941
msgid "Project Name"
69426942
msgstr ""
69436943

@@ -6992,103 +6992,103 @@ msgid ""
69926992
"their project permissions."
69936993
msgstr ""
69946994

6995-
#: warehouse/templates/manage/project/settings.html:176
6995+
#: warehouse/templates/manage/project/settings.html:178
69966996
msgid "Transfer project"
69976997
msgstr ""
69986998

6999-
#: warehouse/templates/manage/project/settings.html:182
6999+
#: warehouse/templates/manage/project/settings.html:184
70007000
msgid "Cannot transfer project to another organization"
70017001
msgstr ""
70027002

7003-
#: warehouse/templates/manage/project/settings.html:184
7003+
#: warehouse/templates/manage/project/settings.html:186
70047004
msgid "Cannot transfer project to an organization"
70057005
msgstr ""
70067006

7007-
#: warehouse/templates/manage/project/settings.html:189
7007+
#: warehouse/templates/manage/project/settings.html:191
70087008
msgid ""
70097009
"Organization owners can transfer the project to organizations that they "
70107010
"own or manage."
70117011
msgstr ""
70127012

7013-
#: warehouse/templates/manage/project/settings.html:190
7013+
#: warehouse/templates/manage/project/settings.html:192
70147014
msgid "You are not an owner or manager of any other organizations."
70157015
msgstr ""
70167016

7017-
#: warehouse/templates/manage/project/settings.html:192
7017+
#: warehouse/templates/manage/project/settings.html:194
70187018
msgid ""
70197019
"Project owners can transfer the project to organizations that they own or"
70207020
" manage."
70217021
msgstr ""
70227022

7023-
#: warehouse/templates/manage/project/settings.html:193
7023+
#: warehouse/templates/manage/project/settings.html:195
70247024
msgid "You are not an owner or manager of any organizations."
70257025
msgstr ""
70267026

7027-
#: warehouse/templates/manage/project/settings.html:200
7027+
#: warehouse/templates/manage/project/settings.html:202
70287028
msgid "Alternate repository locations"
70297029
msgstr ""
70307030

7031-
#: warehouse/templates/manage/project/settings.html:203
7031+
#: warehouse/templates/manage/project/settings.html:205
70327032
#, python-format
70337033
msgid ""
70347034
"Provisional support for <a href=\"%(pep_url)s\">PEP 708</a> \"Alternate "
70357035
"Locations\" Metadata."
70367036
msgstr ""
70377037

7038-
#: warehouse/templates/manage/project/settings.html:207
7038+
#: warehouse/templates/manage/project/settings.html:209
70397039
#, python-format
70407040
msgid ""
70417041
"Implementation may change, consider subscribing to <a "
70427042
"href=\"%(pypi_announce_url)s\">pypi-announce</a> to be notified of "
70437043
"changes."
70447044
msgstr ""
70457045

7046-
#: warehouse/templates/manage/project/settings.html:213
7046+
#: warehouse/templates/manage/project/settings.html:215
70477047
#, python-format
70487048
msgid "Alternate repository locations for %(project_name)s"
70497049
msgstr ""
70507050

7051-
#: warehouse/templates/manage/project/settings.html:219
7051+
#: warehouse/templates/manage/project/settings.html:221
70527052
msgid "Description"
70537053
msgstr ""
70547054

7055-
#: warehouse/templates/manage/project/settings.html:235
7055+
#: warehouse/templates/manage/project/settings.html:237
70567056
#, python-format
70577057
msgid "Delete %(name)s from this project."
70587058
msgstr ""
70597059

7060-
#: warehouse/templates/manage/project/settings.html:245
7060+
#: warehouse/templates/manage/project/settings.html:247
70617061
msgid "Alternate Repository Name"
70627062
msgstr ""
70637063

7064-
#: warehouse/templates/manage/project/settings.html:259
7064+
#: warehouse/templates/manage/project/settings.html:261
70657065
msgid "There are no alternate repositories for this project, yet."
70667066
msgstr ""
70677067

7068-
#: warehouse/templates/manage/project/settings.html:261
7068+
#: warehouse/templates/manage/project/settings.html:263
70697069
msgid "Get started by adding an alternate repository below."
70707070
msgstr ""
70717071

7072-
#: warehouse/templates/manage/project/settings.html:264
7072+
#: warehouse/templates/manage/project/settings.html:266
70737073
msgid "Add alternate repository location"
70747074
msgstr ""
70757075

7076-
#: warehouse/templates/manage/project/settings.html:304
7076+
#: warehouse/templates/manage/project/settings.html:306
70777077
msgid "Alternate repository description"
70787078
msgstr ""
70797079

7080-
#: warehouse/templates/manage/project/settings.html:309
7081-
#: warehouse/templates/manage/project/settings.html:320
7080+
#: warehouse/templates/manage/project/settings.html:311
7081+
#: warehouse/templates/manage/project/settings.html:322
70827082
msgid "Description of the purpose or content of the alternate repository."
70837083
msgstr ""
70847084

7085-
#: warehouse/templates/manage/project/settings.html:332
7086-
#: warehouse/templates/manage/project/settings.html:357
7087-
#: warehouse/templates/manage/project/settings.html:361
7085+
#: warehouse/templates/manage/project/settings.html:334
7086+
#: warehouse/templates/manage/project/settings.html:359
7087+
#: warehouse/templates/manage/project/settings.html:363
70887088
msgid "Archive project"
70897089
msgstr ""
70907090

7091-
#: warehouse/templates/manage/project/settings.html:336
7091+
#: warehouse/templates/manage/project/settings.html:338
70927092
#, python-format
70937093
msgid ""
70947094
"Archiving a project will prevent any new uploads, and remove the project "
@@ -7101,33 +7101,33 @@ msgid ""
71017101
"description by editing the README file."
71027102
msgstr ""
71037103

7104-
#: warehouse/templates/manage/project/settings.html:348
7105-
#: warehouse/templates/manage/project/settings.html:351
7104+
#: warehouse/templates/manage/project/settings.html:350
7105+
#: warehouse/templates/manage/project/settings.html:353
71067106
msgid "Unarchive project"
71077107
msgstr ""
71087108

7109-
#: warehouse/templates/manage/project/settings.html:352
7109+
#: warehouse/templates/manage/project/settings.html:354
71107110
msgid ""
71117111
"Unarchiving a project will allow new file uploads and add the project to "
71127112
"the search index."
71137113
msgstr ""
71147114

7115-
#: warehouse/templates/manage/project/settings.html:362
7115+
#: warehouse/templates/manage/project/settings.html:364
71167116
msgid ""
71177117
"Archiving a project will block any new file uploads and remove the "
71187118
"project from the search index."
71197119
msgstr ""
71207120

7121-
#: warehouse/templates/manage/project/settings.html:368
7122-
#: warehouse/templates/manage/project/settings.html:444
7121+
#: warehouse/templates/manage/project/settings.html:370
7122+
#: warehouse/templates/manage/project/settings.html:446
71237123
msgid "Delete project"
71247124
msgstr ""
71257125

7126-
#: warehouse/templates/manage/project/settings.html:371
7126+
#: warehouse/templates/manage/project/settings.html:373
71277127
msgid "Deleting this project will:"
71287128
msgstr ""
71297129

7130-
#: warehouse/templates/manage/project/settings.html:376
7130+
#: warehouse/templates/manage/project/settings.html:378
71317131
#, python-format
71327132
msgid ""
71337133
"Irreversibly delete the project along with <a href=\"%(href)s\">%(count)s"
@@ -7138,15 +7138,15 @@ msgid_plural ""
71387138
msgstr[0] ""
71397139
msgstr[1] ""
71407140

7141-
#: warehouse/templates/manage/project/settings.html:382
7141+
#: warehouse/templates/manage/project/settings.html:384
71427142
msgid "Irreversibly delete the project"
71437143
msgstr ""
71447144

7145-
#: warehouse/templates/manage/project/settings.html:386
7145+
#: warehouse/templates/manage/project/settings.html:388
71467146
msgid "Make the project name available to <strong>any other PyPI</strong> user"
71477147
msgstr ""
71487148

7149-
#: warehouse/templates/manage/project/settings.html:389
7149+
#: warehouse/templates/manage/project/settings.html:391
71507150
msgid ""
71517151
"This user will be able to make new releases under this project name, so "
71527152
"long as the distribution filenames do not match filenames from a "

warehouse/manage/forms.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -532,12 +532,6 @@ class TransferOrganizationProjectForm(wtforms.Form):
532532
],
533533
)
534534

535-
def validate_organization(self, field):
536-
if self.organization.data in self.disabled_organizations:
537-
raise wtforms.validators.ValidationError(
538-
_("Cannot transfer to Company Organization with inactive billing")
539-
)
540-
541535
def __init__(self, *args, organization_choices, **kwargs):
542536
super().__init__(*args, **kwargs)
543537
self.organization.choices += [
@@ -551,6 +545,12 @@ def __init__(self, *args, organization_choices, **kwargs):
551545
str(org.id) for org in organization_choices if not org.good_standing
552546
]
553547

548+
def validate_organization(self, field):
549+
if self.organization.data in self.disabled_organizations:
550+
raise wtforms.validators.ValidationError(
551+
_("Cannot transfer to Company Organization with inactive billing")
552+
)
553+
554554

555555
class CreateOrganizationRoleForm(
556556
OrganizationRoleNameMixin, UsernameMixin, wtforms.Form

warehouse/templates/manage/project/settings.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,10 @@ <h3>
157157
</p>
158158
{% set action = request.route_path('manage.project.transfer_organization_project', project_name=project.normalized_name) %}
159159
{% set extra_fields %}
160-
<label for="transfer-project-modal-organization">Organization account name</label>
161-
<select id="transfer-project-modal-organization" class="form-group__field">
160+
<label for="transfer_organization_project_name-modal-organization">Organization account name</label>
161+
<select id="transfer_organization_project_name-modal-organization"
162+
name="organization"
163+
class="form-group__field">
162164
{% for option in transfer_organization_project_form.organization %}
163165
{% if option.data in transfer_organization_project_form.disabled_organizations %}
164166
{{ option(disabled="") }}

0 commit comments

Comments
 (0)