You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the class TimeSeriesSelectorReportView in django-erp-framework/erp_framework/reporting/views.py inherits from both UserPassesTestMixin and ReportViewBase in the wrong order. This results in a TypeError: Cannot create a consistent method resolution order (MRO) for bases error when attempting to runserver or migration.
Observed Behavior:
When running python manage.py migrate, the following error occurs:
Traceback (most recent call last):
...
..
..
...
File "/home/gedion/Desktop/ERP/virt/src/django-erp-framework/erp_framework/reporting/views.py", line 213, in <module>
class TimeSeriesSelectorReportView(UserPassesTestMixin, ReportViewBase):
TypeError: Cannot create a consistent method resolution order (MRO) for bases UserPassesTestMixin, ReportViewBase
Expected Behavior:
runserver and Migrations should run successfully without encountering any errors.
Proposed Solution:
The order of inheritance in TimeSeriesSelectorReportView should be reversed:
class TimeSeriesSelectorReportView(ReportViewBase, UserPassesTestMixin):
This ensures that methods from ReportViewBase are prioritized over those from UserPassesTestMixin, resolving the MRO conflict and allowing to the server and migrations to run successfully.
Additional Notes:
This issue was identified during development of the my-shop project.
The proposed solution was tested and confirmed to resolve the error.
This appears to be a bug in the django-erp-framework package.
Desired Outcome:
The developers of django-erp-framework address this bug in a future release. The documentation for django-erp-framework is updated to reflect the correct order of inheritance for TimeSeriesSelectorReportView.
The text was updated successfully, but these errors were encountered:
Issue:
I think the class
TimeSeriesSelectorReportView
indjango-erp-framework/erp_framework/reporting/views.py
inherits from bothUserPassesTestMixin
andReportViewBase
in the wrong order. This results in aTypeError: Cannot create a consistent method resolution order (MRO) for bases error
when attempting to runserver or migration.Observed Behavior:
When running python manage.py migrate, the following error occurs:
Expected Behavior:
runserver and Migrations should run successfully without encountering any errors.
Proposed Solution:
The order of inheritance in
TimeSeriesSelectorReportView
should be reversed:class TimeSeriesSelectorReportView(ReportViewBase, UserPassesTestMixin):
This ensures that methods from
ReportViewBase
are prioritized over those fromUserPassesTestMixin
, resolving the MRO conflict and allowing to the server and migrations to run successfully.Additional Notes:
This issue was identified during development of the my-shop project.
The proposed solution was tested and confirmed to resolve the error.
This appears to be a bug in the django-erp-framework package.
Desired Outcome:
The developers of django-erp-framework address this bug in a future release. The documentation for django-erp-framework is updated to reflect the correct order of inheritance for
TimeSeriesSelectorReportView
.The text was updated successfully, but these errors were encountered: