redisco icon indicating copy to clipboard operation
redisco copied to clipboard

Modelset filter doesn't work in other DB except 0

Open XinfuZheng opened this issue 8 years ago • 0 comments

I have multiple dbs to store data. If I specify the db 1 in model class as below: class Param(models.Model): Name = models.Attribute(required=True, unique=True) class Meta: indices = ['Name'] db = redis.Redis(host="127.0.0.1", port=6379, db='1')

The object creation is successful, the object will be created and stored in db 1. But with Param.objects.filter(Name='xxxx'), the resultset is empty. If I don't have this db specification in model class meta, the creation and query both work.

Anyone aware of this issue?

XinfuZheng avatar Mar 10 '17 09:03 XinfuZheng