o
    »ïØe  ã                   @   s   d Z G dd„ deƒZdS )z*GM2MField support for autocomplete fields.c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚGM2MFieldMixinzGM2MField ror FutureModelForm.c                 C   s"   |j sdS dd„ t||ƒ ¡ D ƒS )z5Return the list of objects in the GM2MField relation.Nc                 S   s   g | ]}t |d |ƒ‘qS )Úgm2m_tgt)Úgetattr)Ú.0Úx© r   ú[/var/www/html/Testing_prj/Navya-Bakers/venv/lib/python3.10/site-packages/dal_gm2m/fields.pyÚ
<listcomp>	   s    
ÿÿz4GM2MFieldMixin.value_from_object.<locals>.<listcomp>)Úpkr   Úall)ÚselfÚinstanceÚnamer   r   r   Úvalue_from_object   s   þz GM2MFieldMixin.value_from_objectc                 C   s   t |||ƒ dS )z%Save the relation into the GM2MField.N)Úsetattr)r   r   r   Úvaluer   r   r   Úsave_relation_data   s   z!GM2MFieldMixin.save_relation_dataN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s    r   N)r   Úobjectr   r   r   r   r   Ú<module>   s    