Repository: chaoss/augur

Issue:
Release Task Periodic Error : branch: `main`
**Description:**
When release metadata is not fully populated on a repo (a rare occurrence), the following error is generated: 
```
Traceback (most recent call last):
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/celery/app/trace.py", line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/sean/github/ag3/augur/tasks/github/releases/tasks.py", line 15, in collect_releases
    releases_model(session, repo.repo_git, repo.repo_id)
  File "/home/sean/github/ag3/augur/tasks/github/releases/core.py", line 186, in releases_model
    insert_release(session, repo_id, data['owner'], release)
  File "/home/sean/github/ag3/augur/tasks/github/releases/core.py", line 79, in insert_release
    release_inf = get_release_inf(session, repo_id, release, tag_only)
  File "/home/sean/github/ag3/augur/tasks/github/releases/core.py", line 19, in get_release_inf
    name = "" if release['author']['name'] is None else release['author']['name']
TypeError: 'NoneType' object is not subscriptable

```

**How to reproduce:**
The `ag3` instance on our test server has this error right now. 

**Expected behavior:**
No error

**Software versions:**
 - `augur-new-dev`
 - OS: Ubuntu 20.5



Discussion:
![](https://github.trello.services/images/mini-trello-icon.png) [Release worker database errror handling](https://trello.com/c/je4bbFNG/102-release-worker-database-errror-handling)
The error appears to occur when there is no `author` defined for a release. Example: https://github.com/ContainerSSH/dockerrun/releases .. None of the releases here have an author. 

When we hit this code: 

```
def get_release_inf(session, repo_id, release, tag_only):
    if not tag_only:
        name = "" if release['author']['name'] is None else release['author']['name']
```

We literally are trying to subscript a NoneType, which is not allowed. The issue is there is no `author` object at all. So, I think we need to test for that first. @ABrain7710 / @IsaacMilarky 

Resolving patch:
diff --git a/augur/tasks/github/releases/core.py b/augur/tasks/github/releases/core.py
--- a/augur/tasks/github/releases/core.py
+++ b/augur/tasks/github/releases/core.py
@@ -16,9 +16,17 @@
 
 def get_release_inf(session, repo_id, release, tag_only):
     if not tag_only:
-        name = "" if release['author']['name'] is None else release['author']['name']
-        company = "" if release['author']['company'] is None else release['author']['company']
-        author = name + '_' + company
+
+        if release['author'] is None:
+            author = 'No Author Available.'
+            name = "N/A"
+            company = "N/A"
+        else:
+            name = "" if release['author']['name'] is None else release['author']['name']
+            company = "" if release['author']['company'] is None else release['author']['company']
+            author = name + '_' + company
+
+
         release_inf = {
             'release_id': release['id'],
             'repo_id': repo_id,


Test patch: