dahlia / sqlalchemy-imageattach

SQLAlchemy extension for attaching images to entities.
https://sqlalchemy-imageattach.readthedocs.io/
MIT License
116 stars 25 forks source link

uselist = False produces relationship with uselist=True #41

Open yfilali opened 7 years ago

yfilali commented 7 years ago

image_attachment is overriding the uselist kwargs causing sqlalchemy to still uselist in its representation. This causes code that inspects relationships to mistake the single image for a list of images.

profile_image = image_attachment('UserProfileImage', uselist=False)

I would expect proper behavior to pass the uselist kwargs unchanged.