for key, value in query.items():
                if key not in obj.__dict__ or obj.__dict__[key] != value:
                    ok_obj = False