pycasbin / django-orm-adapter

Django ORM Adapter for PyCasbin
https://github.com/casbin/pycasbin
Apache License 2.0
30 stars 19 forks source link

fix: compatible with new pycasbin #15

Closed Nekotoxin closed 2 years ago

Nekotoxin commented 2 years ago

Fix: https://github.com/pycasbin/django-orm-adapter/issues/14

eremeevfd commented 2 years ago

@Nekotoxin Can you also check please this error:

  File "/Users/f.eremeev/saas/saas_core_v2/source/.venv/lib/python3.10/site-packages/casbin/core_enforcer.py", line 65, in __init__
    self.init_with_model_and_adapter(model, adapter)
  File "/Users/f.eremeev/saas/saas_core_v2/source/.venv/lib/python3.10/site-packages/casbin/core_enforcer.py", line 85, in init_with_model_and_adapter
    raise RuntimeError("Invalid parameters for enforcer.")
RuntimeError: Invalid parameters for enforcer.

It appears when enable_logging is dropped

Or is it just my misconfig and model shouldn't be a path?

eremeevfd commented 2 years ago

@Nekotoxin Okay, this was an issue with my model path type, I had PosixPath, manually converted it to string and everything worked

eremeevfd commented 2 years ago

Thank you for the fix @Nekotoxin ! I'm really looking forward to this merge :)

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 1.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: