TypeError: Direct assignment to the forward side of a many-to-many set is prohibited. Use courses.set() instead

I have installed latest master branch of openedx. Follow devstack docker install instruction, I’ve got an error when program “Adding demo program to Discovery…”. Thanks fo help!
Log:

  Applying course_metadata.0239_auto_20200409_1937... OK
python manage.py install_es_indexes
2020-04-14 04:12:34,636 INFO 67 [algoliasearch_django.registration] /edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/algoliasearch_django/registration.py:74 - REGISTER <class 'course_discovery.apps.course_metadata.algolia_proxy_models.AlgoliaProxyProduct'>
2020-04-14 04:12:35,379 INFO 67 [course_discovery.apps.core.management.commands.install_es_indexes] /edx/app/discovery/discovery/course_discovery/apps/core/management/commands/install_es_indexes.py:19 - Attempting to establish initial connection to Elasticsearch host [http://edx.devstack.elasticsearch:9200/]...
2020-04-14 04:12:35,380 INFO 67 [course_discovery.apps.core.management.commands.install_es_indexes] /edx/app/discovery/discovery/course_discovery/apps/core/management/commands/install_es_indexes.py:21 - ...success!
2020-04-14 04:12:35,380 INFO 67 [course_discovery.apps.core.utils] /edx/app/discovery/discovery/course_discovery/apps/core/utils.py:18 - Making sure alias [catalog] exists...
2020-04-14 04:12:35,410 INFO 67 [course_discovery.apps.core.utils] /edx/app/discovery/discovery/course_discovery/apps/core/utils.py:22 - ...alias exists.
+ echo -e Creating super-user for discovery...
-e Creating super-user for discovery...
+ docker exec -t edx.devstack.discovery bash -c source /edx/app/$1/$1_env && echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser(\"edx\", \"edx@example.com\", \"edx\") if not User.objects.filter(username=\"edx\").exists() else None" | python /edx/app/$1/$1/manage.py shell -- discovery
2020-04-14 04:12:37,264 INFO 78 [algoliasearch_django.registration] /edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/algoliasearch_django/registration.py:74 - REGISTER <class 'course_discovery.apps.course_metadata.algolia_proxy_models.AlgoliaProxyProduct'>
+ ./provision-ida-user.sh discovery discovery 18381
-e Creating service user and OAuth2 applications for discovery...
/edx/app/edxapp/venvs/edxapp/lib/python3.5/distutils/__init__.py:4: PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
2020-04-14 04:12:42,462 WARNING 4091 [py.warnings] [user None] __init__.py:128 - /edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/sorl/thumbnail/conf/__init__.py:16: RemovedInDjango30Warning: The DEFAULT_CONTENT_TYPE setting is deprecated.
  setattr(self, attr, getattr(obj, attr))

2020-04-14 04:12:42,464 WARNING 4091 [py.warnings] [user None] __init__.py:142 - /edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/sorl/thumbnail/conf/__init__.py:16: RemovedInDjango31Warning: The FILE_CHARSET setting is deprecated. Starting with Django 3.1, all files read from disk must be UTF-8 encoded.
  setattr(self, attr, getattr(obj, attr))

2020-04-14 04:12:43,074 WARNING 4091 [py.warnings] [user None] checks.py:1101 - /edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/django/contrib/admin/checks.py:1101: RemovedInDjango30Warning: Update CourseRegistrationCodeInvoiceItemInline.has_add_permission() to accept a positional `obj` argument.
  "`obj` argument." % cls.__name__, RemovedInDjango30Warning

2020-04-14 04:12:44,499 WARNING 4091 [py.warnings] [user None] __init__.py:10 - /edx/app/edxapp/edx-platform/lms/djangoapps/courseware/__init__.py:10: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
  warnings.warn(msg, DeprecationWarning)

Found existing user: "discovery_worker"
Adding user "discovery_worker" to groups []
Removing user "discovery_worker" from groups []
/edx/app/edxapp/venvs/edxapp/lib/python3.5/distutils/__init__.py:4: PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
2020-04-14 04:12:50,776 WARNING 4110 [py.warnings] [user None] __init__.py:128 - /edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/sorl/thumbnail/conf/__init__.py:16: RemovedInDjango30Warning: The DEFAULT_CONTENT_TYPE setting is deprecated.
  setattr(self, attr, getattr(obj, attr))

2020-04-14 04:12:50,778 WARNING 4110 [py.warnings] [user None] __init__.py:142 - /edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/sorl/thumbnail/conf/__init__.py:16: RemovedInDjango31Warning: The FILE_CHARSET setting is deprecated. Starting with Django 3.1, all files read from disk must be UTF-8 encoded.
  setattr(self, attr, getattr(obj, attr))

2020-04-14 04:12:51,343 WARNING 4110 [py.warnings] [user None] checks.py:1101 - /edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/django/contrib/admin/checks.py:1101: RemovedInDjango30Warning: Update CourseRegistrationCodeInvoiceItemInline.has_add_permission() to accept a positional `obj` argument.
  "`obj` argument." % cls.__name__, RemovedInDjango30Warning

2020-04-14 04:12:52,762 WARNING 4110 [py.warnings] [user None] __init__.py:10 - /edx/app/edxapp/edx-platform/lms/djangoapps/courseware/__init__.py:10: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
  warnings.warn(msg, DeprecationWarning)

2020-04-14 04:12:53,161 INFO 4110 [openedx.core.djangoapps.oauth_dispatch.management.commands.create_dot_application] [user None] create_dot_application.py:165 - Application with name discovery-sso and user discovery_worker already exists.
2020-04-14 04:12:53,163 INFO 4110 [openedx.core.djangoapps.oauth_dispatch.management.commands.create_dot_application] [user None] create_dot_application.py:123 - Application access for application discovery-sso already exists.
/edx/app/edxapp/venvs/edxapp/lib/python3.5/distutils/__init__.py:4: PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
2020-04-14 04:12:58,857 WARNING 4128 [py.warnings] [user None] __init__.py:128 - /edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/sorl/thumbnail/conf/__init__.py:16: RemovedInDjango30Warning: The DEFAULT_CONTENT_TYPE setting is deprecated.
  setattr(self, attr, getattr(obj, attr))

2020-04-14 04:12:58,860 WARNING 4128 [py.warnings] [user None] __init__.py:142 - /edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/sorl/thumbnail/conf/__init__.py:16: RemovedInDjango31Warning: The FILE_CHARSET setting is deprecated. Starting with Django 3.1, all files read from disk must be UTF-8 encoded.
  setattr(self, attr, getattr(obj, attr))

2020-04-14 04:12:59,560 WARNING 4128 [py.warnings] [user None] checks.py:1101 - /edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/django/contrib/admin/checks.py:1101: RemovedInDjango30Warning: Update CourseRegistrationCodeInvoiceItemInline.has_add_permission() to accept a positional `obj` argument.
  "`obj` argument." % cls.__name__, RemovedInDjango30Warning

2020-04-14 04:13:01,060 WARNING 4128 [py.warnings] [user None] __init__.py:10 - /edx/app/edxapp/edx-platform/lms/djangoapps/courseware/__init__.py:10: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
  warnings.warn(msg, DeprecationWarning)

2020-04-14 04:13:01,423 INFO 4128 [openedx.core.djangoapps.oauth_dispatch.management.commands.create_dot_application] [user None] create_dot_application.py:165 - Application with name discovery-backend-service and user discovery_worker already exists.
+ echo -e Compiling static assets for discovery...
-e Compiling static assets for discovery...
+ docker exec -t edx.devstack.discovery bash -c source /edx/app/$1/$1_env && cd /edx/app/$1/$1/ && make static -- discovery
/edx/app/discovery/discovery/node_modules/.bin/webpack --config webpack.config.js --display-error-details --progress --optimize-minimize
Hash: 4ea80de8e6f58c432c29
Version: webpack 4.42.1
Time: 1613ms
Built at: 04/14/2020 4:13:04 AM
                                                                   Asset       Size  Chunks                         Chunk Names
  font/glyphicons-halflings-regular-060b2710bdbbe3dfe48b58d59bd5f1fb.svg    106 KiB          [emitted]              
  font/glyphicons-halflings-regular-4692b9ec53fd5972caa2f2372ae20d16.ttf   44.3 KiB          [emitted]              
  font/glyphicons-halflings-regular-5be1347c682810f199c7f486f40c5974.eot   19.7 KiB          [emitted]              
 font/glyphicons-halflings-regular-82b1212e45a2bc35dd731913b27ad813.woff   22.9 KiB          [emitted]              
font/glyphicons-halflings-regular-be810be3a3e14c682a257d6eff341fe4.woff2   17.6 KiB          [emitted]              
                                   query-preview-4ea80de8e6f58c432c29.js    212 KiB       0  [emitted] [immutable]  query-preview
                            query-preview.style-4ea80de8e6f58c432c29.css    125 KiB       1  [emitted]              query-preview.style
                             query-preview.style-4ea80de8e6f58c432c29.js  932 bytes       1  [emitted] [immutable]  query-preview.style
Entrypoint query-preview = query-preview-4ea80de8e6f58c432c29.js
Entrypoint query-preview.style = query-preview.style-4ea80de8e6f58c432c29.js query-preview.style-4ea80de8e6f58c432c29.css
[1] ./js/query-preview.js 3.13 KiB {0} [built]
[5] ./sass/query-preview.scss 41 bytes [built]
[7] /edx/app/discovery/discovery/node_modules/css-loader/dist/cjs.js!/edx/app/discovery/discovery/node_modules/sass-loader/dist/cjs.js??ref--4-3!./sass/query-preview.scss 123 KiB [built]
    + 13 hidden modules

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
Child extract-text-webpack-plugin ../../node_modules/extract-text-webpack-plugin/dist ../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??ref--4-3!sass/query-preview.scss:
                                                                       Asset      Size  Chunks             Chunk Names
      font/glyphicons-halflings-regular-060b2710bdbbe3dfe48b58d59bd5f1fb.svg   106 KiB          [emitted]  
      font/glyphicons-halflings-regular-4692b9ec53fd5972caa2f2372ae20d16.ttf  44.3 KiB          [emitted]  
      font/glyphicons-halflings-regular-5be1347c682810f199c7f486f40c5974.eot  19.7 KiB          [emitted]  
     font/glyphicons-halflings-regular-82b1212e45a2bc35dd731913b27ad813.woff  22.9 KiB          [emitted]  
    font/glyphicons-halflings-regular-be810be3a3e14c682a257d6eff341fe4.woff2  17.6 KiB          [emitted]  
    Entrypoint undefined = extract-text-webpack-plugin-output-filename
    [1] /edx/app/discovery/discovery/node_modules/css-loader/dist/cjs.js!/edx/app/discovery/discovery/node_modules/sass-loader/dist/cjs.js??ref--4-3!./sass/query-preview.scss 123 KiB {0} [built]
        + 8 hidden modules
python manage.py collectstatic -v 0 --noinput
2020-04-14 04:13:06,040 INFO 99 [algoliasearch_django.registration] /edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/algoliasearch_django/registration.py:74 - REGISTER <class 'course_discovery.apps.course_metadata.algolia_proxy_models.AlgoliaProxyProduct'>
2020-04-14 04:13:09,571 INFO 114 [algoliasearch_django.registration] /edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/algoliasearch_django/registration.py:74 - REGISTER <class 'course_discovery.apps.course_metadata.algolia_proxy_models.AlgoliaProxyProduct'>
2020-04-14 04:13:10,232 INFO 114 [course_discovery.apps.core.management.commands.create_or_update_partner] /edx/app/discovery/discovery/course_discovery/apps/core/management/commands/create_or_update_partner.py:127 - Partner updated with code edx
2020-04-14 04:13:12,552 INFO 124 [algoliasearch_django.registration] /edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/algoliasearch_django/registration.py:74 - REGISTER <class 'course_discovery.apps.course_metadata.algolia_proxy_models.AlgoliaProxyProduct'>
2020-04-14 04:13:13,240 INFO 124 [course_discovery.apps.course_metadata.management.commands.refresh_course_metadata] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/management/commands/refresh_course_metadata.py:116 - Command is not using threads to write data.
2020-04-14 04:13:13,242 INFO 124 [course_discovery.apps.course_metadata.management.commands.refresh_course_metadata] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/management/commands/refresh_course_metadata.py:153 - Executing Loader [http://edx.devstack.lms:18000/api/courses/v1/]
2020-04-14 04:13:13,300 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:34 - Refreshing Courses and CourseRuns from http://edx.devstack.lms:18000/api/courses/v1/...
2020-04-14 04:13:13,301 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:84 - Requesting course run page 1...
2020-04-14 04:13:13,678 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:92 - Retrieved 2 course runs...
2020-04-14 04:13:13,683 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:149 - Processed course run with UUID [4f30f12d-3b1d-477d-92c4-3b46c6b055e9].
2020-04-14 04:13:13,686 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:204 - Processed course with key [edX+DemoX].
2020-04-14 04:13:13,690 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:149 - Processed course run with UUID [7c42b053-a06d-476e-9e0e-84ac553cf465].
2020-04-14 04:13:13,693 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:204 - Processed course with key [edX+E2E-101].
2020-04-14 04:13:13,693 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:43 - Looping to request all 1 pages...
2020-04-14 04:13:13,693 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:60 - Retrieved 2 course runs from http://edx.devstack.lms:18000/api/courses/v1/.
2020-04-14 04:13:13,693 INFO 124 [course_discovery.apps.course_metadata.management.commands.refresh_course_metadata] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/management/commands/refresh_course_metadata.py:153 - Executing Loader [http://edx.devstack.ecommerce:18130/api/v2/]
2020-04-14 04:13:13,695 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:321 - Refreshing ecommerce data from http://edx.devstack.ecommerce:18130/api/v2/...
2020-04-14 04:13:16,136 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:459 - Retrieved 1 course seats...
2020-04-14 04:13:16,184 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:470 - Retrieved 0 course entitlements...
2020-04-14 04:13:16,184 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:482 - Retrieved 1 course enrollment codes...
2020-04-14 04:13:16,190 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:775 - Creating enrollment code Enrollment code for verified seat in edX Demonstration Course with sku A5B6DBE for partner edX
2020-04-14 04:13:16,199 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:387 - Expected 1 course seats, 0 course entitlements, and 1 enrollment codes from http://edx.devstack.ecommerce:18130/api/v2/.
2020-04-14 04:13:16,199 INFO 124 [course_discovery.apps.course_metadata.data_loaders.api] /edx/app/discovery/discovery/course_discovery/apps/course_metadata/data_loaders/api.py:393 - Actually Received 1 course seats, 0 course entitlements, and 1 enrollment codes from http://edx.devstack.ecommerce:18130/api/v2/.
2020-04-14 04:13:18,578 INFO 135 [algoliasearch_django.registration] /edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/algoliasearch_django/registration.py:74 - REGISTER <class 'course_discovery.apps.course_metadata.algolia_proxy_models.AlgoliaProxyProduct'>
2020-04-14 04:13:19,577 INFO 135 [course_discovery.apps.core.utils] /edx/app/discovery/discovery/course_discovery/apps/core/utils.py:53 - ...index [catalog_20200414_041319] created.
Indexing 0 People
Indexing 2 courses
Indexing 1 course runs
Indexing 1 programs
-e Adding demo program to Discovery...
2020-04-14 04:13:22,499 INFO 146 [algoliasearch_django.registration] /edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/algoliasearch_django/registration.py:74 - REGISTER <class 'course_discovery.apps.course_metadata.algolia_proxy_models.AlgoliaProxyProduct'>
Traceback (most recent call last):
  File "/edx/app/discovery/discovery/manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "/edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/django/core/management/commands/shell.py", line 86, in handle
    exec(options['command'])
  File "<string>", line 43, in <module>
  File "/edx/app/discovery/venvs/discovery/lib/python3.5/site-packages/django/db/models/fields/related_descriptors.py", line 538, in __set__
    % self._get_set_deprecation_msg_params(),
TypeError: Direct assignment to the forward side of a many-to-many set is prohibited. Use courses.set() instead.
Makefile:79: recipe for target 'dev.provision.services' failed
make: *** [dev.provision.services] Error 1

System:
Ubuntu 18.04 Bionic Beaver
Docker version 19.03.5, build 633a0ea838
docker-compose version 1.25.4, build a133471