Project

General

Profile

0001-misc-enable-hard-limits-on-fields-count-66844.patch

Frédéric Péters (de retour le 10/10), 01 July 2022 09:21 AM

Download (1.37 KB)

View differences:

Subject: [PATCH] misc: enable hard limits on fields count (#66844)

 wcs/admin/fields.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
wcs/admin/fields.py
335 335
        r = TemplateIO(html=True)
336 336

  
337 337
        r += self.index_top()
338
        ignore_hard_limits = get_publisher().has_site_option('ignore-hard-limits', default=True)
338
        ignore_hard_limits = get_publisher().has_site_option('ignore-hard-limits', default=False)
339 339

  
340 340
        if self.page_id and self.page_id not in (x.id for x in self.objectdef.fields or []):
341 341
            raise errors.TraversalError()
......
481 481

  
482 482
    def get_new_field_form(self, page_id):
483 483
        r = TemplateIO(html=True)
484
        ignore_hard_limits = get_publisher().has_site_option('ignore-hard-limits', default=True)
484
        ignore_hard_limits = get_publisher().has_site_option('ignore-hard-limits', default=False)
485 485

  
486 486
        if len(self.objectdef.fields) >= self.fields_count_total_hard_limit:
487 487
            if not ignore_hard_limits:
488
-