Permalink
Browse files

Stripping port-info from PayPalNVP ipaddress field

This is necessary to avoid errors from postgres backends.
  • Loading branch information...
chrischambers committed Sep 19, 2010
1 parent f22c34a commit 3066b39eb821b38e5cf7bf48063bfd9a6ffb9015
Showing with 1 addition and 1 deletion.
  1. +1 −1 paypal/pro/models.py
View
@@ -59,7 +59,7 @@ class Meta:
def init(self, request, paypal_request, paypal_response):
"""Initialize a PayPalNVP instance from a HttpRequest."""
- self.ipaddress = request.META.get('REMOTE_ADDR', '')
+ self.ipaddress = request.META.get('REMOTE_ADDR', '').split(':')[0]
if hasattr(request, "user") and request.user.is_authenticated():
self.user = request.user

0 comments on commit 3066b39

Please sign in to comment.