Skip to content
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

T7 Corporate Membership Sumbission - Receives an Error #421

Closed
bleven opened this issue Sep 30, 2015 · 1 comment
Closed

T7 Corporate Membership Sumbission - Receives an Error #421

bleven opened this issue Sep 30, 2015 · 1 comment
Labels
Bug Errors or not functioning as designed

Comments

@bleven
Copy link
Contributor

bleven commented Sep 30, 2015

I've tried to add a corporate membership on a demo site spun up via create.tendenci.com.

Submitting a corporate membership application produces the following error on
www.example.com/corporatememberships/applications/add/

Error details below:

Environment:

Request Method: POST
Request URL: http://create-project.tendenci.net/corporatememberships/applications/add/

Django Version: 1.8.4
Python Version: 2.7.6
Installed Applications:
('django_admin_bootstrapped',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.humanize',
'django.contrib.sitemaps',
'django.contrib.messages',
'django.contrib.admindocs',
'django.contrib.staticfiles',
'formtools',
'bootstrap3',
'pagination',
'tagging',
'avatar',
'tinymce',
'haystack',
'captcha',
'tendenci',
'tendenci.libs.model_report',
'tendenci.apps.entities',
'tendenci.apps.base',
'tendenci.apps.site_settings',
'tendenci.apps.contributions',
'tendenci.apps.search',
'tendenci.apps.notifications',
'tendenci.apps.registration',
'tendenci.apps.registry',
'tendenci.apps.api_tasty',
'tendenci.apps.invoices',
'tendenci.apps.payments',
'tendenci.apps.recurring_payments',
'tendenci.apps.forms_builder.forms',
'tendenci.apps.accounts',
'tendenci.apps.files',
'tendenci.apps.user_groups',
'tendenci.apps.perms',
'tendenci.apps.profiles',
'tendenci.apps.meta',
'tendenci.apps.tags',
'tendenci.apps.articles',
'tendenci.apps.jobs',
'tendenci.apps.news',
'tendenci.apps.stories',
'tendenci.apps.pages',
'tendenci.apps.events',
'tendenci.apps.photos',
'tendenci.apps.memberships',
'tendenci.apps.corporate_memberships',
'tendenci.apps.locations',
'tendenci.apps.industries',
'tendenci.apps.regions',
'tendenci.apps.educations',
'tendenci.apps.careers',
'tendenci.apps.make_payments',
'tendenci.apps.accountings',
'tendenci.apps.emails',
'tendenci.apps.email_blocks',
'tendenci.apps.contacts',
'tendenci.apps.robots',
'tendenci.apps.versions',
'tendenci.apps.event_logs',
'tendenci.apps.categories',
'tendenci.apps.theme_editor',
'tendenci.libs.styled_forms',
'tendenci.apps.newsletters',
'tendenci.apps.redirects',
'tendenci.apps.directories',
'tendenci.apps.help_files',
'tendenci.apps.resumes',
'tendenci.apps.boxes',
'tendenci.apps.mobile',
'tendenci.apps.social_auth',
'tendenci.apps.campaign_monitor',
'tendenci.apps.wp_importer',
'tendenci.apps.wp_exporter',
'tendenci.apps.theme',
'tendenci.apps.discounts',
'tendenci.apps.metrics',
'tendenci.apps.navs',
'tendenci.apps.tendenci_guide',
'tendenci.apps.exports',
'tendenci.apps.events.ics',
'tendenci.apps.imports',
'tendenci.apps.handler404',
'tendenci.apps.reports',
'tendenci.apps.dashboard',
'tendenci.apps.social_media',
'tendenci.apps.announcements',
'tendenci.apps.forums',
'djkombu',
'djcelery',
'gunicorn',
'django.contrib.gis',
'committees',
'case_studies',
'donations',
'speakers',
'staff',
'studygroups',
'videos',
'tendenci.apps.explorer_extensions',
'explorer',
'testimonials',
'dinette',
'sorl.thumbnail')
Installed Middleware:
('django.middleware.gzip.GZipMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'tendenci.libs.swfupload.middleware.SWFUploadMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'tendenci.libs.swfupload.middleware.SSLRedirectMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'tendenci.apps.profiles.middleware.ProfileLanguageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'pagination.middleware.PaginationMiddleware',
'tendenci.apps.profiles.middleware.ForceLogoutProfileMiddleware',
'tendenci.apps.profiles.middleware.ProfileMiddleware',
'tendenci.apps.base.middleware.Http403Middleware',
'tendenci.apps.redirects.middleware.RedirectMiddleware',
'tendenci.apps.mobile.middleware.MobileMiddleware',
'tendenci.apps.theme.middleware.RequestMiddleware',
'tendenci.apps.base.middleware.MissingAppMiddleware',
'tendenci.apps.memberships.middleware.ExceededMaxTypesMiddleware',
'tendenci.apps.forums.middleware.PybbMiddleware',
'dinette.middleware.UserActivity')

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1.                 response = wrapped_callback(request, _callback_args, *_callback_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/tendenci/apps/perms/decorators.py" in wrapped
  2.         return fn(request, _args, *_kwargs)
    
    File "/usr/local/lib/python2.7/dist-packages/tendenci/apps/corporate_memberships/views.py" in corpmembership_add
  3.         inv = corp_memb_inv_add(request.user, corp_membership, app=app)
    
    File "/usr/local/lib/python2.7/dist-packages/tendenci/apps/corporate_memberships/utils.py" in corp_memb_inv_add
  4.             payment.save(user)
    
    File "/usr/local/lib/python2.7/dist-packages/tendenci/apps/payments/models.py" in save
  5.     super(Payment, self).save()
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py" in save
  6.                    force_update=force_update, update_fields=update_fields)
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py" in save_base
  7.         updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py" in _save_table
  8.                                   forced_update)
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py" in _do_update
  9.     return filtered._update(values) > 0
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in _update
  10.     return query.get_compiler(self.db).execute_sql(CURSOR)
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in execute_sql
  11.     cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in execute_sql
  12.         sql, params = self.as_sql()
    
    File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in as_sql
  13.                                 (field.**class**.**name**, val.**class**.**name**))
    

Exception Type: TypeError at /corporatememberships/applications/add/
Exception Value: Database is trying to update a relational field of type CharField with a value of type PaymentMethod. Make sure you are setting the correct relations

@bleven bleven added the Bug Errors or not functioning as designed label Oct 1, 2015
@jennyq
Copy link
Member

jennyq commented Oct 15, 2015

Resolved. aaaeafb

@bleven bleven closed this as completed Nov 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Errors or not functioning as designed
Projects
None yet
Development

No branches or pull requests

2 participants