l#g2ddlmZmZGddeZdS))IntegrityErrorModelc(eZdZdZedZdS)rz Common Model class that fix create_or_get method with using CompositeKey. https://stackoverflow.com/questions/35167628/peewee-create-or-get-error-in-model-with-compositekey c  |jj5|jdi|dfcdddS#1swxYwYdS#t$rg}|D]b\}}t ||}|jjr|j|jj j vn|j }|j s|r| ||kc|j |dfcYSwxYw)NTF)_metadatabaseatomiccreateritemsgetattr composite_keyname primary_key field_namesuniqueappendget)clskwargsquery field_namevaluefieldfield_is_primary_keys S/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/model/__init__.py create_or_getzModel.create_or_get sY *#**,, 2 2!sz++F++T1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 * * *E%+\\^^ 1 1! EZ00y.+EJ#)"7"CCC*% <1#71LL%00037E?E) ) ) ) *s2A < A AA AA BCCN)__name__ __module__ __qualname____doc__ classmethodrrrrrs9 **[***r#rN)peeweerr BaseModelrr#rr&sQ55555555*****I*****r#