horilla-opensource / horilla

Horilla is a free and open source HR software.
https://www.horilla.com/
GNU Lesser General Public License v2.1
83 stars 43 forks source link

Onboarding view is giving error #160

Closed BhuviTheDataGuy closed 2 weeks ago

BhuviTheDataGuy commented 2 weeks ago

When we click on the onboarding view we get this error

image

Traceback (most recent call last):
  File "/opt/horilla/horilla/decorators.py", line 191, in wrapped_view
    func = view_func(request, *args, **kwargs)
  File "/opt/horilla/onboarding/decorators.py", line 68, in _function
    OnboardingTask.objects.filter(employee_id=employee).exists()
  File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 1241, in exists
    return self.query.has_results(using=self.db)
  File "/usr/local/lib/python3.10/dist-packages/django/db/models/sql/query.py", line 598, in has_results
    return compiler.has_results()
  File "/usr/local/lib/python3.10/dist-packages/django/db/models/sql/compiler.py", line 1530, in has_results
    return bool(self.execute_sql(SINGLE))
  File "/usr/local/lib/python3.10/dist-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 102, in execute
    return super().execute(sql, params)
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/usr/local/lib/python3.10/dist-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "onboarding_onboardingtask" does not exist
LINE 1: SELECT 1 AS "a" FROM "onboarding_onboardingtask" INNER JOIN ...
                             ^

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "onboarding_onboardingtask" does not exist
LINE 1: SELECT 1 AS "a" FROM "onboarding_onboardingtask" INNER JOIN ...
                             ^

Verified this error on docker and native installation.

BhuviTheDataGuy commented 2 weeks ago

Thanks for the help. As mentioned in #161 It's due to a migration issue. Its fixed now.