Skip to content

Commit

Permalink
Merge pull request #139 from spdx/fixuniqueid
Browse files Browse the repository at this point in the history
Fix issue #137 - non-unique license submittal request
  • Loading branch information
goneall committed Jun 9, 2020
2 parents 50f644f + e7d6b3d commit 1e666e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/views.py
Expand Up @@ -1506,9 +1506,9 @@ def issue(request):
licenseRequest = LicenseRequest(licenseAuthorName=licenseAuthorName, fullname=licenseName, shortIdentifier=licenseIdentifier,
submissionDatetime=now, userEmail=userEmail, notes=licenseNotes, xml=xml)
licenseRequest.save()
licenseId = LicenseRequest.objects.get(shortIdentifier=licenseIdentifier).id
licenseRequestId = licenseRequest.id
serverUrl = request.build_absolute_uri('/')
licenseRequestUrl = os.path.join(serverUrl, reverse('license-requests')[1:], str(licenseId))
licenseRequestUrl = os.path.join(serverUrl, reverse('license-requests')[1:], str(licenseRequestId))
statusCode = utils.createIssue(licenseAuthorName, licenseName, licenseIdentifier, licenseComments, licenseSourceUrls, licenseHeader, licenseOsi, licenseRequestUrl, token, urlType, matchId, diffUrl, msg)
data['statusCode'] = str(statusCode)
return JsonResponse(data)
Expand Down

0 comments on commit 1e666e8

Please sign in to comment.