
    h;                         d dl mZ d Zy)    )ContentTypec                    t        | d      r	 t        | j                  j                               }t               }|D ]   }t        |d      s|j                  |       " t        | d      r|d   }n|d   }t        j                  j                  |      }|S t        j                  j                  |       }|S # t        $ r' t        | j                  j                  |             }Y w xY w)aA  
    Helper function to return the base polymorphic content type id. This should used with django-guardian and the
    GUARDIAN_GET_CONTENT_TYPE option.

    See the django-guardian documentation for more information:

    https://django-guardian.readthedocs.io/en/latest/configuration.html#guardian-get-content-type
    polymorphic_model_markercan_have_children)	hasattrlist	__class__mro	TypeErrorappendr   objectsget_for_model)objsuperclassespolymorphic_superclassessclassroot_polymorphic_classctypes         L/home/dcms/DCMS/lib/python3.12/site-packages/polymorphic/contrib/guardian.py!get_polymorphic_base_content_typer      s     s./	8 1 1 34L
 $(6 " 	8Fv9:(//7	8
 3+,%=b%A"%=b%A"##112HI
 L ##11#6L'  	8 1 1# 67L	8s   #B9 9-C)(C)N)"django.contrib.contenttypes.modelsr   r        r   <module>r      s    :r   