question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with rules on CreateView introduced in 1.4

See original GitHub issue

https://github.com/dfunckt/django-rules/blob/master/rules/contrib/views.py#L37

Using self.get_object will introduce an error when using rules on a view that inherits from CreateView. This is because CreateView does inherit SingleObjectMixin and does have a get_object callable, but it will throw an exception when its get_object is called:

AttributeError: Generic detail view {InheritsFromCreateView} must be called with either an object pk or a slug.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dyvecommented, Sep 24, 2018

I think the solution should be in django-rules

0reactions
dyvecommented, Oct 4, 2018

@dfunckt Any chance of a new release with this fix pulled in?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Hive CREATE VIEW fails due to no SELECT access on
I have been validating the Ranger options. I have select on all columns of a hive table: SELECT ssn, name, location FROM employee;....
Read more >
527364 – inconsistentName error for the oid with the number ...
Reason: inconsistentName (That object can not currently be created) Failed object: SNMP-VIEW-BASED-ACM-MIB::vacmViewTreeFamilyStatus."vmini".8.1.3.6.1.4.1.2021.
Read more >
[Snackbar] InflateException thrown on obfuscated builds #1814
I can work on reproducing this on my end and see what's happening. Have you explored any proguard keep rules with any success?...
Read more >
Errors -206 and -111 attempting to access database objects ...
Cause. Errors -206 and -111 indicate the object does not exist in the remote target. To construct the fully qualified name, the following...
Read more >
django createview, how to reset the initial value in the form?
i got a "list indices must be integers, not str" error, i've checked the source code, the possible method i need to rewrite...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found