mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #533] Internal Server Error: /admin/accounts/new/ #506
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#506
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mongos on GitHub (Mar 24, 2014).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/533
Hello,
Trying to add new account with domain admin:
Internal Server Error: /admin/accounts/new/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 187, in get_response
response = middleware_method(request, response)
File "/usr/local/lib/python2.7/dist-packages/reversion/middleware.py", line 37, in process_response
self._close_revision(request)
File "/usr/local/lib/python2.7/dist-packages/reversion/middleware.py", line 28, in _close_revision
revision_context_manager.end()
File "/usr/local/lib/python2.7/dist-packages/reversion/revisions.py", line 182, in end
db = self._db,
File "/usr/local/lib/python2.7/dist-packages/reversion/revisions.py", line 483, in save_revision
versions = new_versions,
File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 170, in send
response = receiver(signal=self, sender=sender, **named)
File "/usr/local/lib/python2.7/dist-packages/modoboa/core/models.py", line 479, in post_revision_commit
prev_revisions = reversion.get_for_object(version.object)
File "/usr/local/lib/python2.7/dist-packages/reversion/revisions.py", line 518, in get_for_object
return self.get_for_object_reference(obj.class, obj.pk, db)
AttributeError: 'NoneType' object has no attribute 'pk'
Please help. Thank you in advance.
@tonioo commented on GitHub (Mar 24, 2014):
Hello, which version are you using?
@mongos commented on GitHub (Mar 24, 2014):
It is 1.1.1
@tonioo commented on GitHub (Mar 24, 2014):
I fail to reproduce your issue. What's your setup? (mysql or postgresl)
@mongos commented on GitHub (Mar 24, 2014):
MySQL
@tonioo commented on GitHub (Mar 24, 2014):
Could you try with the code available in the 1.1.x branch ? (only contains bugfixes)
@mongos commented on GitHub (Mar 24, 2014):
Now it say: "Mailboxes: limit reached"
@tonioo commented on GitHub (Mar 24, 2014):
Ok. As a super administrator, edit the domain admin and go to the "Resources" tab. I guess all limits are equal to 0. First solution is to define greater limits. Second solution is to disable the limits extension if you don't need it.
If you do need it then don't forget to define proper default values by going to Modoboa > Parameters > Limits.
@mongos commented on GitHub (Mar 24, 2014):
Cool. Works now! Thanks.
Another report. Trying to add an account with cyrillic in First and Last name:
Internal Server Error: /admin/accounts/edit/30/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view
return view_func(request, _args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view
return view_func(request, _args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 223, in inner
return func(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/reversion/revisions.py", line 300, in do_revision_context
return func(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/modoboa-1.1.1-py2.7.egg/modoboa/extensions/admin/views/identity.py", line 189, in editaccount
form.save_general_form()
File "/usr/local/lib/python2.7/dist-packages/modoboa-1.1.1-py2.7.egg/modoboa/extensions/admin/forms/account.py", line 360, in save_general_form
self.account = self.forms[0]["instance"].save()
File "/usr/local/lib/python2.7/dist-packages/modoboa-1.1.1-py2.7.egg/modoboa/extensions/admin/forms/account.py", line 105, in save
account.save()
File "/usr/local/lib/python2.7/dist-packages/modoboa-1.1.1-py2.7.egg/modoboa/core/models.py", line 303, in save
super(User, self).save(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 546, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 626, in save_base
rows = manager.using(using).filter(pk=pk_val)._update(values)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 605, in _update
return query.get_compiler(self.db).execute_sql(None)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 1020, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 846, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", line 41, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 120, in execute
return self.cursor.execute(query, args)
File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 207, in execute
if not self._defer_warnings: self._warning_check()
File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 117, in _warning_check
warn(w[-1], self.Warning, 3)
Warning: Incorrect string value: '\xD0\x90\xD1\x80\xD1\x82...' for column 'first_name' at row 1
Thank you in advance.
@tonioo commented on GitHub (Mar 24, 2014):
What's your database collation?
@mongos commented on GitHub (Mar 24, 2014):
Heh. Forgot to change the default values. Thanks a lot!