New site error after manual install - domain_settings sql query error

hi i have weird problem
Installing frappe…
Updating DocTypes for frappe : [========================================]
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 94, in
main()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/site.py”, line 29, in new_site
verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/site.py”, line 64, in _new_site
_install_app(app, verbose=verbose, set_as_patched=not source_sql)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/installer.py”, line 145, in install_app
add_to_installed_apps(name)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/installer.py”, line 166, in add_to_installed_apps
post_install(rebuild_website)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/installer.py”, line 230, in post_install
init_singles()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/installer.py”, line 251, in init_singles
doc.save()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 256, in save
return self._save(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 279, in _save
self.insert()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 245, in insert
self.run_post_save_methods()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 827, in run_post_save_methods
self.run_method(“on_update”)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 702, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 964, in composer
return composed(self, method, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 947, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 696, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/domain_settings/domain_settings.py”, line 21, in on_update
self.restrict_roles_and_modules()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/domain_settings/domain_settings.py”, line 26, in restrict_roles_and_modules
active_domains = frappe.get_active_domains()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 1400, in get_active_domains
return get_active_domains()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/domain_settings/domain_settings.py”, line 61, in get_active_domains
return frappe.cache().get_value(“active_domains”, _get_active_domains)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 72, in get_value
val = generator()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/domain_settings/domain_settings.py”, line 55, in _get_active_domains
fields=[“domain”], distinct=True)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 1173, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 1146, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 88, in execute
result = self.build_and_run()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 112, in build_and_run
return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/database.py”, line 163, in sql
self._cursor.execute(query)
File “/home/ubuntu/frappe-bench/env/src/mysqlclient/MySQLdb/cursors.py”, line 250, in execute
self.errorhandler(self, exc, value)
File “/home/ubuntu/frappe-bench/env/src/mysqlclient/MySQLdb/connections.py”, line 50, in defaulterrorhandler
raise errorvalue
_mysql_exceptions.OperationalError: (3065, “Expression #1 of ORDER BY clause is not in SELECT list, references column ‘c5675e9623555ebe.tabHas Domain.modified’ which is not in SELECT list; this is incompatible with DISTINCT”)

Which document did you follow at installing?

That code was changed and committed as recently as 5 days ago https://github.com/frappe/frappe/pull/4163

i made new instant and re install all the stuff again , it works fine !!
must did something wrong at the first time … thank you guys for answer and support <3