Repository: pymedusa/Medusa

Issue:
[APP SUBMITTED]: AttributeError: 'GitUpdateManager' object has no attribute 'get_cur_commit_hash'

### INFO
**Python Version**: `3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)]`
**Operating System**: `Windows-7-6.1.7601-SP1`
**Locale**: `cp1255`
**Branch**: [develop](../tree/develop)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@a2b8c29179381a2933ee8bc3f14cfb080dc98cf3
**Link to Log**: **No Log available**
### ERROR
<pre>
2019-01-26 23:52:28 ERROR    TORNADO :: [a2b8c29] API :: AttributeError("'GitUpdateManager' object has no attribute 'get_cur_commit_hash'")
Traceback (most recent call last):
  File "C:\Medusa\<a href="../blob/a2b8c29179381a2933ee8bc3f14cfb080dc98cf3/medusa/server/api/v1/core.py#L142">medusa\server\api\v1\core.py</a>", line 142, in get
    out_dict = _call_dispatcher(args, kwargs)
  File "C:\Medusa\<a href="../blob/a2b8c29179381a2933ee8bc3f14cfb080dc98cf3/medusa/server/api/v1/core.py#L212">medusa\server\api\v1\core.py</a>", line 212, in call_dispatcher
    cur_out_dict = func(cur_args, cur_kwargs).run()  # call function and get response
  File "C:\Medusa\<a href="../blob/a2b8c29179381a2933ee8bc3f14cfb080dc98cf3/medusa/server/api/v1/core.py#L1416">medusa\server\api\v1\core.py</a>", line 1416, in run
    'commit': check_version.updater.get_cur_commit_hash(),
AttributeError: 'GitUpdateManager' object has no attribute 'get_cur_commit_hash'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators



Discussion:

Resolving patch:
diff --git a/medusa/server/api/v1/core.py b/medusa/server/api/v1/core.py
--- a/medusa/server/api/v1/core.py
+++ b/medusa/server/api/v1/core.py
@@ -1413,13 +1413,13 @@ def run(self):
         data = {
             'current_version': {
                 'branch': check_version.get_branch(),
-                'commit': check_version.updater.get_cur_commit_hash(),
-                'version': check_version.updater.get_cur_version(),
+                'commit': check_version.updater.current_commit_hash,
+                'version': check_version.updater.current_version,
             },
             'latest_version': {
                 'branch': check_version.get_branch(),
-                'commit': check_version.updater.get_newest_commit_hash(),
-                'version': check_version.updater.get_newest_version(),
+                'commit': check_version.updater.newest_commit_hash,
+                'version': check_version.updater.newest_version,
             },
             'commits_offset': check_version.updater.commits_behind,
             'needs_update': needs_update,
diff --git a/medusa/updater/version_checker.py b/medusa/updater/version_checker.py
--- a/medusa/updater/version_checker.py
+++ b/medusa/updater/version_checker.py
@@ -189,7 +189,7 @@ def getDBcompare(self):
         """
         try:
             self.updater.need_update()
-            cur_hash = str(self.updater.get_newest_commit_hash())
+            cur_hash = str(self.updater.newest_commit_hash)
             assert len(cur_hash) == 40, 'Commit hash wrong length: {length} hash: {hash}'.format(
                 length=len(cur_hash), hash=cur_hash)
 


Test patch: