Sinar / popolo.contenttypes

GNU General Public License v2.0
1 stars 2 forks source link

For Memberships relationship fields for Person and Organization should be required #41

Closed kaerumy closed 2 years ago

kaerumy commented 3 years ago
    # Person
    directives.widget('person',
                      RelatedItemsFieldWidget,
                      pattern_options={
                        'basePath': '/',
                        'mode': 'auto',
                        'favourites': [],
                        }
                      )

    person = RelationChoice(
            title=u'Person',
            source=CatalogSource(portal_type='Person'),
            required=False,
            )

    # Organization
    directives.widget('organization',
                      RelatedItemsFieldWidget,
                      pattern_options={
                        'basePath': '/',
                        'mode': 'auto',
                        'favourites': [],
                        }
                      )
    organization = RelationChoice(
            title=u'Organization',
            source=CatalogSource(portal_type='Organization'),
            required=False,
            )
kaerumy commented 3 years ago

Can be fixed with this pull request https://github.com/Sinar/politikus/pull/68.

These should be enforced, as per the specifications and avoid bad data.