diff --git a/ChangeLog b/ChangeLog
index bd5d8f9..50e9ee6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-03-08  Matt Brown  <matt@mattb.net.nz>
 
+	* conduit/datatypes/File.py: Include tags in the hash of the object.
+	* conduit/datatypes/Photo.py: Include underlying file hash plus photo
+	metadata (size, caption) in the hash of the object. Fixes bug #521196.
+
+2008-03-08  Matt Brown  <matt@mattb.net.nz>
+
 	* conduit/modules/FspotModule/FspotModule.py: Modify F-Spot provider to
 	set captions on images retrived from F-Spot.
 
diff --git a/conduit/datatypes/File.py b/conduit/datatypes/File.py
index 35f72b4..9ec454f 100644
--- a/conduit/datatypes/File.py
+++ b/conduit/datatypes/File.py
@@ -378,8 +378,11 @@ class File(DataType.DataType):
             return None
 
     def get_hash(self):
+        # Join the tags into a string to be hashed so the object is updated if
+        # they change.
+        tagstr = "".join(self.get_tags())
         #FIXME: self.get_size() does not seem reliable
-        return hash(None)
+        return hash(tagstr)
                        
     def get_filename(self):
         """
diff --git a/conduit/datatypes/Photo.py b/conduit/datatypes/Photo.py
index c14dcae..68eeb5c 100644
--- a/conduit/datatypes/Photo.py
+++ b/conduit/datatypes/Photo.py
@@ -58,6 +58,13 @@ class Photo(File.File):
         Sets the tags of the datatype
         """
         self._caption = caption
+
+    def get_hash(self):
+        # Combine the file hash with other photo metadata.
+        file_hash = File.File.get_hash(self)       
+        hash_data = "%s%s%s" % (file_hash, self.get_photo_size(),
+                self.get_caption())
+        return hash(hash_data)
         
     def __getstate__(self):
         data = File.File.__getstate__(self)
