-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
action_user created with incorrect to= model #24
Comments
Oddly enough, e678183 changes the behaviour so that an error is generated instead:
Which is odd, I don't see anything in this commit which would have had such a significant change. Still investigating... |
Defining a forward reference from
If we had a class reference that would work (as this is how |
I feel I should contribute here as #16 is where I proposed a fix for this very issue. The pull request was never merged... |
Hi Brian, I'm not sure that the PersonAuditLogEntry.action_user field should be a foreign key to Person, it kind of makes sense that it should relate to the PersonAuditLogEntry model instead. Deleting a Person shouldn't cause all related $FooAuditLogEntry to be cascade deleted, should it? Regards, |
Just for the record, I believe that #16 was applied, just not exactly the same way as in the merge request. @tysonclugg Was going based on what happens for all other classes, where Cascaded deletes can be disabled by setting Oddly enough, on some circumstances, karaage.PersonAuditLogEntry.action_user: (fields.E300) Field defines a relation with model 'karaage.Person', which is either not installed, or is abstract. This is something I still don't really understand, it should be set to |
It seems to be that under certain circumstances the code introduced by #16 doesn't get |
Ok, one mystery solved. In from django.conf import settings
from audit_log import settings i.e. the settings value is being overridden. The Now I understand why e678183 broke things. |
Yesterday I made the following comment, but it accidentally ended up in the wrong place - it ended up in the commit, not here. In
|
No, problem still not resolved, just one of the issues I noticed along the way. We need to work out in
|
Possibly this bug was fixed in c168ef2? |
No, it's not fixed yet. I was making the unit tests catch this bug as I was starting to fix it. But I've yet to work out a fix. |
Hello,
I have in my Django settings file:
If I try to update this model to use django-audit-log, it gives me a migration containing the following field:
However, this is incorrect, it should point to karaage.Person, like for the other tables, eg:
This results in errors such as the following one:
Any ideas?
Regards
The text was updated successfully, but these errors were encountered: