U
    ÔÉ>i  ã                   @   s:   d dl mZ d dlmZ d dlmZ G dd„ dejƒZdS )é    )Úforms)Úget_adapter)Úflowsc                       s(   e Zd Z‡ fdd„Z‡ fdd„Z‡  ZS )ÚGenerateRecoveryCodesFormc                    s   |  d¡| _tƒ j||Ž d S )NÚuser)Úpopr   ÚsuperÚ__init__)ÚselfÚargsÚkwargs©Ú	__class__© úD/tmp/pip-unpacked-wheel-upujnpc2/allauth/mfa/recovery_codes/forms.pyr	      s    z"GenerateRecoveryCodesForm.__init__c                    s&   t ƒ  ¡ }t | j¡s"tƒ  d¡‚|S )NZcannot_generate_recovery_codes)r   Úcleanr   Zcan_generate_recovery_codesr   r   Zvalidation_error)r
   Zcleaned_datar   r   r   r      s    
zGenerateRecoveryCodesForm.clean)Ú__name__Ú
__module__Ú__qualname__r	   r   Ú__classcell__r   r   r   r   r      s   r   N)Zdjangor   Zallauth.mfa.adapterr   Z#allauth.mfa.recovery_codes.internalr   ZFormr   r   r   r   r   Ú<module>   s   