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

Failure to delete test cases when the number of test cases in the test plan is greater than 100 #1149

radiateboy opened this issue Sep 27, 2019 · 2 comments


Copy link

@radiateboy radiateboy commented Sep 27, 2019

Description of problem

  1. add test case in test plan and test cases greater than 100
  2. select all cases and delete all.

This comment has been minimized.

Copy link

@atodorov atodorov commented Sep 27, 2019

Reported as KIWI-TCMS-8F on Sentry

InvalidQuery: Field TestCase.case_status cannot be both deferred and traversed using select_related at the same time.
  File "django/core/handlers/", line 34, in inner
    response = get_response(request)
  File "django/core/handlers/", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "django/core/handlers/", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/generic/", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "django/views/generic/", line 97, in dispatch
    return handler(request, *args, **kwargs)
  File "tcms/testplans/", line 503, in post
    for case in cases:
  File "django/db/models/", line 274, in __iter__
  File "django/db/models/", line 1242, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "django/db/models/", line 55, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "django/db/models/sql/", line 1087, in execute_sql
    sql, params = self.as_sql()
  File "django/db/models/sql/", line 474, in as_sql
    extra_select, order_by, group_by = self.pre_sql_setup()
  File "django/db/models/sql/", line 54, in pre_sql_setup
  File "django/db/models/sql/", line 45, in setup_query, self.klass_info, self.annotation_col_map = self.get_select()
  File "django/db/models/sql/", line 240, in get_select
    related_klass_infos = self.get_related_selections(select)
  File "django/db/models/sql/", line 830, in get_related_selections
  File "django/db/models/", line 253, in select_related_descend

@RMadjev want to give this a try ?

@atodorov atodorov added the bug label Sep 27, 2019

This comment has been minimized.

Copy link

@RMadjev RMadjev commented Sep 27, 2019


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.